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
8 changes: 7 additions & 1 deletion docs/changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,13 @@

All notable changes to this project will be documented in this file.

## [2.1.21] - Current
## [2.1.22] - Current

### Fixed

- **UIhelper#verifyAlertErrorMessage**: match sign-in error toasts that are not exposed as `role="alert"` (alertdialog / alert / text fallback, visible filter, 30s timeout).

## [2.1.21]

### Fixed

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@red-hat-developer-hub/e2e-test-utils",
"version": "2.1.21",
"version": "2.1.22",
"description": "Test utilities for RHDH E2E tests",
"license": "Apache-2.0",
"repository": {
Expand Down
11 changes: 8 additions & 3 deletions src/playwright/helpers/ui-helper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -584,9 +584,14 @@ export class UIhelper {
}

async verifyAlertErrorMessage(message: string | RegExp) {
const alert = this.page.getByRole("alert");
await alert.waitFor();
await expect(alert).toHaveText(message);
const alert = this.page
.getByRole("alertdialog")
.filter({ hasText: message })
.or(this.page.getByRole("alert").filter({ hasText: message }))
.or(this.page.getByText(message));
await expect(alert.filter({ visible: true }).first()).toBeVisible({
timeout: 30_000,
});
}

async verifyTextInTooltip(text: string | RegExp) {
Expand Down
Loading