Skip to content

Commit 3817711

Browse files
expect buttons to be visible before clicking them, to avoid flaky results on CI
1 parent 006a47b commit 3817711

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

apps/meteor/tests/e2e/saml.spec.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -416,14 +416,16 @@ test.describe('SAML', () => {
416416

417417
await page2.goto(`/home`);
418418
await expect(page2).toHaveURL('/home');
419-
await expect(page2.getByRole('button', { name: 'User menu' })).not.toBeVisible();
420419

421420
await page.goto(`/invite/${inviteId}`);
422421
await page.getByRole('link', { name: 'Back to Login' }).click();
423422

423+
await expect(poRegistration.btnLoginWithSaml).toBeVisible();
424424
await poRegistration.btnLoginWithSaml.click();
425425
await expect(page).toHaveURL(/.*\/simplesaml\/module.php\/core\/loginuserpass.php.*/);
426426

427+
await expect(page2.getByRole('button', { name: 'User menu' })).not.toBeVisible();
428+
await expect(poRegistration2.btnLoginWithSaml).toBeVisible();
427429
await poRegistration2.btnLoginWithSaml.click();
428430
await expect(page2).toHaveURL(/.*\/simplesaml\/module.php\/core\/loginuserpass.php.*/);
429431

0 commit comments

Comments
 (0)