Skip to content

Commit 99a5687

Browse files
committed
Fix locator for help menu
1 parent 2055c6c commit 99a5687

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

src/SIL.XForge.Scripture/ClientApp/e2e/e2e-utils.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -193,14 +193,14 @@ export async function createShareLinksAsAdmin(
193193
await page.getByRole('link', { name: 'Users' }).click();
194194
await page.getByRole('button', { name: 'Share' }).click();
195195

196-
await page.getByTitle('Change invitation language').click();
196+
await page.getByText('Invitation will be shared in').getByText('(change)').click();
197197
await page.getByRole('option', { name: 'English (US)' }).click();
198198

199199
const roleToLink: { [role: string]: string } = {};
200200

201201
let optionCount = Number.POSITIVE_INFINITY;
202202
for (let i = 0; i < optionCount; i++) {
203-
await page.getByTitle('Change invitation role').click();
203+
await page.getByText('Anyone with the link can').getByText('(change)').click();
204204
const options = await page.getByRole('option').all();
205205
optionCount = options.length;
206206

@@ -281,7 +281,7 @@ export async function enableFeatureFlag(page: Page, flag: string): Promise<void>
281281
}
282282

283283
export async function enableDeveloperMode(page: Page, options = { closeMenu: false }): Promise<void> {
284-
await page.getByRole('button', { name: 'Help' }).click();
284+
await page.getByRole('button').filter({ hasText: 'help' }).click();
285285

286286
// Playwright refuses to click the version number because it's disabled. We override this with force: true. However,
287287
// this sometimes fails to enable developer mode, probably because the click event was fired before the menu was fully

src/SIL.XForge.Scripture/ClientApp/e2e/workflows/edit-translation.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ export async function editTranslation(
8888
// FIXME(application-bug) We have to click a *different* verse and then back to the one we want to add a note to
8989
await user.click(getSegment(page, 'target', chapter, verse + 1));
9090
await user.click(segment);
91-
await user.click(page.getByRole('button', { name: 'Add Comment' }));
91+
await user.click(page.getByRole('button').filter({ hasText: 'add_comment' }));
9292
await page.getByRole('textbox', { name: 'Your comment' }).click();
9393
await page.getByRole('textbox', { name: 'Your comment' }).fill('How do you like my translation of this verse?');
9494
await user.click(page.getByRole('radio', { name: 'Save' }));
@@ -124,7 +124,7 @@ export async function editTranslation(
124124
await user.click(page.getByRole('button', { name: 'Select' }));
125125

126126
// Swap the source and target sides
127-
await user.click(page.getByRole('button', { name: 'Swap source and target' }));
127+
await user.click(page.getByRole('button').filter({ hasText: 'swap_horiz' }));
128128

129129
// Delete the project so edits don't persist and cloud the history
130130
await deleteProject(page, DEFAULT_PROJECT_SHORTNAME);

0 commit comments

Comments
 (0)