Skip to content

Commit e4aa85b

Browse files
committed
✅(e2e) fix flakiness
Some tests were getting very flaky due to previous tests updates. This should fix it.
1 parent 2dc1e07 commit e4aa85b

File tree

2 files changed

+9
-4
lines changed

2 files changed

+9
-4
lines changed

src/frontend/apps/e2e/__tests__/app-impress/doc-header.spec.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -438,7 +438,9 @@ test.describe('Doc Header', () => {
438438

439439
// Pin
440440
await page.getByText('push_pin').click();
441-
await page.getByLabel('Open the document options').click();
441+
await page
442+
.getByRole('button', { name: 'Open the document options' })
443+
.click();
442444
await expect(page.getByText('Unpin')).toBeVisible();
443445

444446
await page.goto('/');

src/frontend/apps/e2e/__tests__/app-impress/utils-share.ts

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -113,9 +113,12 @@ export const connectOtherUserToDoc = async (
113113
const otherPage = await otherContext.newPage();
114114
await otherPage.goto(docUrl);
115115

116-
await otherPage.getByRole('button', { name: 'Login' }).click({
117-
timeout: 15000,
118-
});
116+
await otherPage
117+
.getByRole('main', { name: 'Main content' })
118+
.getByLabel('Login')
119+
.click({
120+
timeout: 15000,
121+
});
119122

120123
await keyCloakSignIn(otherPage, otherBrowserName, false);
121124

0 commit comments

Comments
 (0)