-
Notifications
You must be signed in to change notification settings - Fork 477
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(demo-playwright): test for
alert-service
(#5786)
- Loading branch information
1 parent
6dad7a1
commit 274d5fd
Showing
2 changed files
with
18 additions
and
13 deletions.
There are no files selected for viewing
13 changes: 0 additions & 13 deletions
13
projects/demo-cypress/cypress/tests/core/alert-service/alert-service.cy.ts
This file was deleted.
Oops, something went wrong.
18 changes: 18 additions & 0 deletions
18
projects/demo-playwright/tests/core/alert-service/alert-service.spec.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import {tuiGoto} from '@demo-playwright/utils'; | ||
import {expect, test} from '@playwright/test'; | ||
|
||
test.describe(`AlertService`, () => { | ||
test.use({ | ||
viewport: {width: 720, height: 720}, | ||
}); | ||
|
||
test(`is shown correctly`, async ({page}) => { | ||
await tuiGoto(page, `/services/alert-service`); | ||
const example = page.locator(`#text`); | ||
const showAlertButton = example.locator(`tui-alerts-example-1 button`).first(); | ||
|
||
await showAlertButton.click(); | ||
|
||
await expect(page.locator(`tui-alert`)).toHaveScreenshot(`01-alert-service.png`); | ||
}); | ||
}); |