-
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
Error
(#6022)
- Loading branch information
1 parent
4e5171e
commit 1e624c0
Showing
2 changed files
with
21 additions
and
13 deletions.
There are no files selected for viewing
13 changes: 0 additions & 13 deletions
13
projects/demo-cypress/cypress/tests/core/error/tui-error.cy.ts
This file was deleted.
Oops, something went wrong.
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,21 @@ | ||
import {TuiDocumentationPagePO, tuiGoto} from '@demo-playwright/utils'; | ||
import {expect, test} from '@playwright/test'; | ||
|
||
test.describe(`TuiError`, () => { | ||
test(`No extra space between content`, async ({page}) => { | ||
await tuiGoto(page, `components/error#base`); | ||
const example = new TuiDocumentationPagePO(page).getExample(`#base`); | ||
|
||
const checkbox = example.locator(`tui-toggle input[type="checkbox"]`); | ||
const error = example.locator(`tui-error`); | ||
|
||
await expect(error).not.toBeVisible(); | ||
await checkbox.click(); | ||
|
||
await expect(checkbox).toBeChecked(); | ||
await expect(error).toBeVisible(); | ||
await expect(error).toHaveText(`An error`); | ||
|
||
await expect(example).toHaveScreenshot(`01-error.png`); | ||
}); | ||
}); |