Skip to content

Commit 7865047

Browse files
authored
Merge pull request #566 from microting/copilot/fix-wdio-test-issue
Fix wdio test timeout by opening action menu before accessing entity list button
2 parents 173c22f + cba8e9d commit 7865047

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

eform-client/e2e/Page objects/BackendConfiguration/BackendConfigurationAreaRules.page.ts

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,14 @@ export class BackendConfigurationAreaRulesPage extends Page {
167167
}
168168

169169
public async updateEntityList() {
170+
// Open the action menu first (required for type 3 area rules where the button is in a dropdown)
171+
await browser.pause(1000);
172+
const actionMenu = await $$('#actionMenu')[0];
173+
await actionMenu.waitForDisplayed({ timeout: 40000 });
174+
await actionMenu.waitForClickable({ timeout: 40000 });
175+
await actionMenu.click();
176+
await browser.pause(1000);
177+
170178
const ele = await $(`.updateEntityList`);
171179
await ele.waitForDisplayed({ timeout: 40000 });
172180
await ele.waitForClickable({ timeout: 40000 });
@@ -333,7 +341,9 @@ export class BackendConfigurationAreaRulesPage extends Page {
333341
} else {
334342
await (await this.entityListSaveBtn()).click();
335343
}
336-
await (await this.updateEntityList()).waitForClickable({ timeout: 40000 })
344+
// Wait for the action menu button to be clickable again (instead of opening the menu)
345+
const actionMenu = await $$('#actionMenu')[0];
346+
await actionMenu.waitForClickable({ timeout: 40000 });
337347
}
338348

339349
public async editEntityItem(index: number, newName: string, clickCancel = false) {

0 commit comments

Comments
 (0)