Skip to content

Commit cba8e9d

Browse files
Copilotrenemadsen
andcommitted
Fix updateEntityList to open action menu before accessing button
Co-authored-by: renemadsen <[email protected]>
1 parent 463a882 commit cba8e9d

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)