Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: add test #9427

Merged
merged 2 commits into from
Oct 10, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Original file line number Diff line number Diff line change
Expand Up @@ -70,15 +70,13 @@ export class TuiSheetDialogComponent<I> implements AfterViewInit {
private readonly stopsRefs: QueryList<ElementRef<HTMLElement>> = EMPTY_QUERY;

private readonly el = tuiInjectElement();
private readonly speed = inject(TUI_ANIMATIONS_SPEED);

private pointers = 0;

protected readonly slideInTop = {
value: '',
params: {
start: '100vh',
duration: tuiGetDuration(this.speed),
duration: tuiGetDuration(inject(TUI_ANIMATIONS_SPEED)),
},
};

Expand Down
13 changes: 13 additions & 0 deletions projects/demo-playwright/tests/core/surface/surface.spec.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import {DemoRoute} from '@demo/routes';
import {TuiDocumentationPagePO, tuiGoto} from '@demo-playwright/utils';
import {expect, test} from '@playwright/test';

test.describe('Surface', () => {
test('Layers', async ({page}) => {
await tuiGoto(page, `${DemoRoute.Dropdown}/Layers`);

const example = new TuiDocumentationPagePO(page).getExample('#layers');

await expect(example).toHaveScreenshot('01-layers.png');

Check failure on line 11 in projects/demo-playwright/tests/core/surface/surface.spec.ts

View workflow job for this annotation

GitHub Actions / Playwright / (2 of 9)

[chromium] › tests/core/surface/surface.spec.ts:6:9 › Surface › Layers

1) [chromium] › tests/core/surface/surface.spec.ts:6:9 › Surface › Layers ──────────────────────── Error: Timeout 5000ms exceeded. Call log: - expect.toHaveScreenshot(01-layers.png) with timeout 5000ms - generating new stable screenshot expectation - waiting for locator('#layers [automation-id="tui-doc-example"]') - Timeout 5000ms exceeded. 9 | const example = new TuiDocumentationPagePO(page).getExample('#layers'); 10 | > 11 | await expect(example).toHaveScreenshot('01-layers.png'); | ^ 12 | }); 13 | }); 14 | at /home/runner/work/taiga-ui/taiga-ui/projects/demo-playwright/tests/core/surface/surface.spec.ts:11:31

Check failure on line 11 in projects/demo-playwright/tests/core/surface/surface.spec.ts

View workflow job for this annotation

GitHub Actions / Playwright / (2 of 9)

[chromium] › tests/core/surface/surface.spec.ts:6:9 › Surface › Layers

1) [chromium] › tests/core/surface/surface.spec.ts:6:9 › Surface › Layers ──────────────────────── Retry #1 ─────────────────────────────────────────────────────────────────────────────────────── Error: Timeout 5000ms exceeded. Call log: - expect.toHaveScreenshot(01-layers.png) with timeout 5000ms - generating new stable screenshot expectation - waiting for locator('#layers [automation-id="tui-doc-example"]') - Timeout 5000ms exceeded. 9 | const example = new TuiDocumentationPagePO(page).getExample('#layers'); 10 | > 11 | await expect(example).toHaveScreenshot('01-layers.png'); | ^ 12 | }); 13 | }); 14 | at /home/runner/work/taiga-ui/taiga-ui/projects/demo-playwright/tests/core/surface/surface.spec.ts:11:31

Check failure on line 11 in projects/demo-playwright/tests/core/surface/surface.spec.ts

View workflow job for this annotation

GitHub Actions / Playwright / (2 of 9)

[chromium] › tests/core/surface/surface.spec.ts:6:9 › Surface › Layers

1) [chromium] › tests/core/surface/surface.spec.ts:6:9 › Surface › Layers ──────────────────────── Retry #2 ─────────────────────────────────────────────────────────────────────────────────────── Error: Timeout 5000ms exceeded. Call log: - expect.toHaveScreenshot(01-layers.png) with timeout 5000ms - generating new stable screenshot expectation - waiting for locator('#layers [automation-id="tui-doc-example"]') - Timeout 5000ms exceeded. 9 | const example = new TuiDocumentationPagePO(page).getExample('#layers'); 10 | > 11 | await expect(example).toHaveScreenshot('01-layers.png'); | ^ 12 | }); 13 | }); 14 | at /home/runner/work/taiga-ui/taiga-ui/projects/demo-playwright/tests/core/surface/surface.spec.ts:11:31
});
});
1 change: 1 addition & 0 deletions projects/demo/src/modules/components/surface/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,7 @@
<hr />

<tui-doc-example
id="layers"
heading="Examples"
[component]="7 | tuiComponent"
[content]="layerExample"
Expand Down
Loading