Skip to content

Commit

Permalink
chore(demo-playwright): tests for field-error (#6133)
Browse files Browse the repository at this point in the history
Co-authored-by: Vidhi Rambhia <[email protected]>
  • Loading branch information
AtharvChandratre and VidhiRambhia authored Nov 30, 2023
1 parent 1dcbee6 commit 7944f20
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 15 deletions.

This file was deleted.

28 changes: 28 additions & 0 deletions projects/demo-playwright/tests/kit/field-error/field-error.spec.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
import {tuiGoto} from '@demo-playwright/utils';
import {expect, test} from '@playwright/test';

const {describe} = test;

describe(`TuiFieldError`, () => {
test(`Errors of invalid control are shown correctly`, async ({page}) => {
await tuiGoto(page, `/pipes/field-error`);

const errorPipeInput = page
.locator(`tui-field-error-pipe-example-1 input`)
.first();

await errorPipeInput.focus();

await page.waitForTimeout(50);

await errorPipeInput.blur();

const example = page
.locator(`tui-doc-example [automation-id="tui-doc-example"]`)
.first();

await expect(example).toHaveScreenshot(`shows-error-under-field.png`, {
animations: `allow`,
});
});
});

0 comments on commit 7944f20

Please sign in to comment.