Skip to content

Commit

Permalink
Merge #3772
Browse files Browse the repository at this point in the history
3772: fix: flaky role management test r=jniles a=jniles

Wait for checkbox in modal to be clickable before blindly clicking it.

Closes #3765

Co-authored-by: Jonathan Niles <jonathanwniles@gmail.com>
  • Loading branch information
bors[bot] and jniles committed Jun 28, 2019
2 parents a18c9f5 + c31beee commit 78a657a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
2 changes: 2 additions & 0 deletions test/end-to-end/rubricsConfig/rubrics_config.page.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@ class RubricConfigPage {
await row.dropdown().click();
await row.method('configure').click();

await browser.wait(EC.elementToBeClickable(element(by.id('social'))), 1500);

await element(by.id('social')).click();
await element(by.id('tax')).click();

Expand Down
9 changes: 6 additions & 3 deletions test/end-to-end/user/roles.page.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
/* global by, element */
/* global element, by, browser */
const EC = require('protractor').ExpectedConditions;
const FU = require('../shared/FormUtils');
const GridRow = require('../shared/GridRow');

Expand Down Expand Up @@ -38,8 +39,10 @@ class RolesPage {
await row.menu.$('[data-method="edit-permissions"]').click();
}

checkAllPerimission() {
return this.checkAll.click();
async checkAllPerimission() {
const checkbox = this.checkAll;
await browser.wait(EC.elementToBeClickable(checkbox), 1500);
await checkbox.click();
}

async assignRole(name) {
Expand Down

0 comments on commit 78a657a

Please sign in to comment.