Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .github/workflows/playwright-hlx.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ on:
pull_request:
types: [opened, synchronize, reopened]

concurrency:
group: ${{ github.workflow }}
cancel-in-progress: false

permissions:
contents: read

Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/playwright.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ on:
pull_request:
types: [opened, synchronize, reopened]

concurrency:
group: ${{ github.workflow }}
cancel-in-progress: false

permissions:
contents: read

Expand Down
10 changes: 9 additions & 1 deletion test/e2e/utils/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
*/
export async function dismissAlertBanner(page) {
const alert = page.getByRole('alert');
const dismiss = () => alert.getByRole('button', { name: 'Dismiss' }).click().catch(() => {});

let visible = await alert.isVisible().catch(() => false);
if (!visible) {
Expand All @@ -28,6 +29,13 @@ export async function dismissAlertBanner(page) {
}

if (visible) {
await alert.getByRole('button', { name: 'Dismiss' }).click();
await dismiss();
} else {
// Some banners (e.g. the "public sandbox" org warning) depend on an async
// check that can resolve well after this initial window, then sit on top
// of later controls (e.g. the preview button) and block clicks. Keep
// watching for a late appearance for the rest of the test instead of
// giving up after a single check.
alert.waitFor({ state: 'visible' }).then(dismiss).catch(() => {});
}
}
Loading