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

fix(addon-mobile): DataList inside DropdownMobile should not have built-in horizontal indent #10213

Merged
merged 1 commit into from
Jan 23, 2025
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
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,11 @@ tui-dropdown-mobile._sheet {
overflow: auto;
}
}

tui-data-list [tuiOption] {
margin-left: calc(-1 * var(--t-option-padding-inline));
margin-right: calc(-1 * var(--t-option-padding-inline));
}
}

.t-dropdown-mobile {
Expand Down
25 changes: 22 additions & 3 deletions projects/core/components/data-list/data-list.style.less
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,13 @@ tui-data-list {

& > .t-empty,
[tuiOption] {
--t-option-padding-inline: 0.5rem;

font: var(--tui-font-text-s);
min-block-size: 2rem;
padding: 0.3125rem 0.5rem;
// TODO: use padding-block after Safari 14+
padding-top: 0.3125rem;
padding-bottom: 0.3125rem;

&::before {
font-size: 1rem;
Expand All @@ -38,9 +42,13 @@ tui-data-list {

&[data-size='m'] > .t-empty,
&[data-size='m'] [tuiOption] {
--t-option-padding-inline: 0.5rem;

font: var(--tui-font-text-s);
min-block-size: 2.5rem;
padding: 0.375rem 0.5rem;
// TODO: use padding-block after Safari 14+
padding-top: 0.375rem;
padding-bottom: 0.375rem;
}

&[data-size='l'] {
Expand All @@ -49,9 +57,13 @@ tui-data-list {

& > .t-empty,
[tuiOption] {
--t-option-padding-inline: 0.625rem;

font: var(--tui-font-text-m);
min-block-size: 2.75rem;
padding: 0.375rem 0.625rem;
// TODO: use padding-block after Safari 14+
padding-top: 0.375rem;
padding-bottom: 0.375rem;
}
}

Expand Down Expand Up @@ -101,6 +113,13 @@ tui-data-list {
border-right: 0.5rem solid;
}
}

& > .t-empty,
[tuiOption] {
// TODO: use padding-inline after Safari 14+
padding-left: var(--t-option-padding-inline);
padding-right: var(--t-option-padding-inline);
}
}

tui-opt-group {
Expand Down
10 changes: 10 additions & 0 deletions projects/demo-playwright/playwright.options.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,16 @@
import type {test} from '@playwright/test';

// cspell:disable
export const TUI_PLAYWRIGHT_MOBILE_USER_AGENT =
'Mozilla/5.0 (iPhone; CPU iPhone OS 11_0 like Mac OS X) AppleWebKit/604.1.38 (KHTML, like Gecko) Version/11.0 Mobile/15A372 Safari/604.1';
// Samsung Galaxy Ace GT:
export const TUI_PLAYWRIGHT_MOBILE_VIEWPORT_WIDTH = 320;
export const TUI_PLAYWRIGHT_MOBILE_VIEWPORT_HEIGHT = 480;

export const TUI_PLAYWRIGHT_MOBILE: Parameters<typeof test.use>[0] = {
viewport: {
width: TUI_PLAYWRIGHT_MOBILE_VIEWPORT_WIDTH,
height: TUI_PLAYWRIGHT_MOBILE_VIEWPORT_HEIGHT,
},
userAgent: TUI_PLAYWRIGHT_MOBILE_USER_AGENT,
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
import {DemoRoute} from '@demo/routes';
import {TuiDocumentationPagePO} from '@demo-playwright/utils';
import {expect, test} from '@playwright/test';

import {TUI_PLAYWRIGHT_MOBILE} from '../../../playwright.options';

const {describe} = test;

describe('DropdownMobile for textfields', () => {
test.use(TUI_PLAYWRIGHT_MOBILE);

test('with select', async ({page}) => {
await page.goto(DemoRoute.Dropdown);

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

await example.locator('tui-select').click();

await expect(page).toHaveScreenshot('dropdown-mobile-with-select.png');

Check failure on line 19 in projects/demo-playwright/tests/addon-mobile/mobile-dropdown/mobile-dropdown-with-textfield.pw.spec.ts

View workflow job for this annotation

GitHub Actions / Playwright / ubuntu-latest / 1 of 9

[chromium] › tests/addon-mobile/mobile-dropdown/mobile-dropdown-with-textfield.pw.spec.ts:12:9 › DropdownMobile for textfields › with select

1) [chromium] › tests/addon-mobile/mobile-dropdown/mobile-dropdown-with-textfield.pw.spec.ts:12:9 › DropdownMobile for textfields › with select Error: expect(page).toHaveScreenshot(expected) 31036 pixels (ratio 0.06 of all image pixels) are different. Expected: /home/runner/work/taiga-ui/taiga-ui/projects/demo-playwright/snapshots/tests/addon-mobile/mobile-dropdown/mobile-dropdown-with-textfield.pw.spec.ts-snapshots/dropdown-mobile-with-select-chromium-linux.png Received: /home/runner/work/taiga-ui/taiga-ui/projects/demo-playwright/tests-results/tests-addon-mobile-mobile--75f60--for-textfields-with-select-chromium/dropdown-mobile-with-select-actual.png Diff: /home/runner/work/taiga-ui/taiga-ui/projects/demo-playwright/tests-results/tests-addon-mobile-mobile--75f60--for-textfields-with-select-chromium/dropdown-mobile-with-select-diff.png Call log: - expect.toHaveScreenshot(dropdown-mobile-with-select.png) with timeout 5000ms - verifying given screenshot expectation - taking page screenshot - disabled all CSS animations - waiting for fonts to load... - fonts loaded - 31036 pixels (ratio 0.06 of all image pixels) are different. - waiting 100ms before taking screenshot - taking page screenshot - disabled all CSS animations - waiting for fonts to load... - fonts loaded - captured a stable screenshot - 31036 pixels (ratio 0.06 of all image pixels) are different. 17 | await example.locator('tui-select').click(); 18 | > 19 | await expect(page).toHaveScreenshot('dropdown-mobile-with-select.png'); | ^ 20 | }); 21 | }); 22 | at /home/runner/work/taiga-ui/taiga-ui/projects/demo-playwright/tests/addon-mobile/mobile-dropdown/mobile-dropdown-with-textfield.pw.spec.ts:19:28

Check failure on line 19 in projects/demo-playwright/tests/addon-mobile/mobile-dropdown/mobile-dropdown-with-textfield.pw.spec.ts

View workflow job for this annotation

GitHub Actions / Playwright / ubuntu-latest / 1 of 9

[chromium] › tests/addon-mobile/mobile-dropdown/mobile-dropdown-with-textfield.pw.spec.ts:12:9 › DropdownMobile for textfields › with select

1) [chromium] › tests/addon-mobile/mobile-dropdown/mobile-dropdown-with-textfield.pw.spec.ts:12:9 › DropdownMobile for textfields › with select Retry #1 ─────────────────────────────────────────────────────────────────────────────────────── Error: expect(page).toHaveScreenshot(expected) 31036 pixels (ratio 0.06 of all image pixels) are different. Expected: /home/runner/work/taiga-ui/taiga-ui/projects/demo-playwright/snapshots/tests/addon-mobile/mobile-dropdown/mobile-dropdown-with-textfield.pw.spec.ts-snapshots/dropdown-mobile-with-select-chromium-linux.png Received: /home/runner/work/taiga-ui/taiga-ui/projects/demo-playwright/tests-results/tests-addon-mobile-mobile--75f60--for-textfields-with-select-chromium-retry1/dropdown-mobile-with-select-actual.png Diff: /home/runner/work/taiga-ui/taiga-ui/projects/demo-playwright/tests-results/tests-addon-mobile-mobile--75f60--for-textfields-with-select-chromium-retry1/dropdown-mobile-with-select-diff.png Call log: - expect.toHaveScreenshot(dropdown-mobile-with-select.png) with timeout 5000ms - verifying given screenshot expectation - taking page screenshot - disabled all CSS animations - waiting for fonts to load... - fonts loaded - 31036 pixels (ratio 0.06 of all image pixels) are different. - waiting 100ms before taking screenshot - taking page screenshot - disabled all CSS animations - waiting for fonts to load... - fonts loaded - captured a stable screenshot - 31036 pixels (ratio 0.06 of all image pixels) are different. 17 | await example.locator('tui-select').click(); 18 | > 19 | await expect(page).toHaveScreenshot('dropdown-mobile-with-select.png'); | ^ 20 | }); 21 | }); 22 | at /home/runner/work/taiga-ui/taiga-ui/projects/demo-playwright/tests/addon-mobile/mobile-dropdown/mobile-dropdown-with-textfield.pw.spec.ts:19:28

Check failure on line 19 in projects/demo-playwright/tests/addon-mobile/mobile-dropdown/mobile-dropdown-with-textfield.pw.spec.ts

View workflow job for this annotation

GitHub Actions / Playwright / ubuntu-latest / 1 of 9

[chromium] › tests/addon-mobile/mobile-dropdown/mobile-dropdown-with-textfield.pw.spec.ts:12:9 › DropdownMobile for textfields › with select

1) [chromium] › tests/addon-mobile/mobile-dropdown/mobile-dropdown-with-textfield.pw.spec.ts:12:9 › DropdownMobile for textfields › with select Retry #2 ─────────────────────────────────────────────────────────────────────────────────────── Error: expect(page).toHaveScreenshot(expected) 31036 pixels (ratio 0.06 of all image pixels) are different. Expected: /home/runner/work/taiga-ui/taiga-ui/projects/demo-playwright/snapshots/tests/addon-mobile/mobile-dropdown/mobile-dropdown-with-textfield.pw.spec.ts-snapshots/dropdown-mobile-with-select-chromium-linux.png Received: /home/runner/work/taiga-ui/taiga-ui/projects/demo-playwright/tests-results/tests-addon-mobile-mobile--75f60--for-textfields-with-select-chromium-retry2/dropdown-mobile-with-select-actual.png Diff: /home/runner/work/taiga-ui/taiga-ui/projects/demo-playwright/tests-results/tests-addon-mobile-mobile--75f60--for-textfields-with-select-chromium-retry2/dropdown-mobile-with-select-diff.png Call log: - expect.toHaveScreenshot(dropdown-mobile-with-select.png) with timeout 5000ms - verifying given screenshot expectation - taking page screenshot - disabled all CSS animations - waiting for fonts to load... - fonts loaded - 31036 pixels (ratio 0.06 of all image pixels) are different. - waiting 100ms before taking screenshot - taking page screenshot - disabled all CSS animations - waiting for fonts to load... - fonts loaded - captured a stable screenshot - 31036 pixels (ratio 0.06 of all image pixels) are different. 17 | await example.locator('tui-select').click(); 18 | > 19 | await expect(page).toHaveScreenshot('dropdown-mobile-with-select.png'); | ^ 20 | }); 21 | }); 22 | at /home/runner/work/taiga-ui/taiga-ui/projects/demo-playwright/tests/addon-mobile/mobile-dropdown/mobile-dropdown-with-textfield.pw.spec.ts:19:28

Check failure on line 19 in projects/demo-playwright/tests/addon-mobile/mobile-dropdown/mobile-dropdown-with-textfield.pw.spec.ts

View workflow job for this annotation

GitHub Actions / Playwright / macos-latest / 1 of 9

[webkit] › tests/addon-mobile/mobile-dropdown/mobile-dropdown-with-textfield.pw.spec.ts:12:9 › DropdownMobile for textfields › with select

1) [webkit] › tests/addon-mobile/mobile-dropdown/mobile-dropdown-with-textfield.pw.spec.ts:12:9 › DropdownMobile for textfields › with select Error: expect(page).toHaveScreenshot(expected) 31205 pixels (ratio 0.06 of all image pixels) are different. Expected: /Users/runner/work/taiga-ui/taiga-ui/projects/demo-playwright/snapshots/tests/addon-mobile/mobile-dropdown/mobile-dropdown-with-textfield.pw.spec.ts-snapshots/dropdown-mobile-with-select-webkit-darwin.png Received: /Users/runner/work/taiga-ui/taiga-ui/projects/demo-playwright/tests-results/tests-addon-mobile-mobile--75f60--for-textfields-with-select-webkit/dropdown-mobile-with-select-actual.png Diff: /Users/runner/work/taiga-ui/taiga-ui/projects/demo-playwright/tests-results/tests-addon-mobile-mobile--75f60--for-textfields-with-select-webkit/dropdown-mobile-with-select-diff.png Call log: - expect.toHaveScreenshot(dropdown-mobile-with-select.png) with timeout 5000ms - verifying given screenshot expectation - taking page screenshot - disabled all CSS animations - waiting for fonts to load... - fonts loaded - 31205 pixels (ratio 0.06 of all image pixels) are different. - waiting 100ms before taking screenshot - taking page screenshot - disabled all CSS animations - waiting for fonts to load... - fonts loaded - captured a stable screenshot - 31205 pixels (ratio 0.06 of all image pixels) are different. 17 | await example.locator('tui-select').click(); 18 | > 19 | await expect(page).toHaveScreenshot('dropdown-mobile-with-select.png'); | ^ 20 | }); 21 | }); 22 | at /Users/runner/work/taiga-ui/taiga-ui/projects/demo-playwright/tests/addon-mobile/mobile-dropdown/mobile-dropdown-with-textfield.pw.spec.ts:19:28

Check failure on line 19 in projects/demo-playwright/tests/addon-mobile/mobile-dropdown/mobile-dropdown-with-textfield.pw.spec.ts

View workflow job for this annotation

GitHub Actions / Playwright / macos-latest / 1 of 9

[webkit] › tests/addon-mobile/mobile-dropdown/mobile-dropdown-with-textfield.pw.spec.ts:12:9 › DropdownMobile for textfields › with select

1) [webkit] › tests/addon-mobile/mobile-dropdown/mobile-dropdown-with-textfield.pw.spec.ts:12:9 › DropdownMobile for textfields › with select Retry #1 ─────────────────────────────────────────────────────────────────────────────────────── Error: expect(page).toHaveScreenshot(expected) 31205 pixels (ratio 0.06 of all image pixels) are different. Expected: /Users/runner/work/taiga-ui/taiga-ui/projects/demo-playwright/snapshots/tests/addon-mobile/mobile-dropdown/mobile-dropdown-with-textfield.pw.spec.ts-snapshots/dropdown-mobile-with-select-webkit-darwin.png Received: /Users/runner/work/taiga-ui/taiga-ui/projects/demo-playwright/tests-results/tests-addon-mobile-mobile--75f60--for-textfields-with-select-webkit-retry1/dropdown-mobile-with-select-actual.png Diff: /Users/runner/work/taiga-ui/taiga-ui/projects/demo-playwright/tests-results/tests-addon-mobile-mobile--75f60--for-textfields-with-select-webkit-retry1/dropdown-mobile-with-select-diff.png Call log: - expect.toHaveScreenshot(dropdown-mobile-with-select.png) with timeout 5000ms - verifying given screenshot expectation - taking page screenshot - disabled all CSS animations - waiting for fonts to load... - fonts loaded - 31205 pixels (ratio 0.06 of all image pixels) are different. - waiting 100ms before taking screenshot - taking page screenshot - disabled all CSS animations - waiting for fonts to load... - fonts loaded - captured a stable screenshot - 31205 pixels (ratio 0.06 of all image pixels) are different. 17 | await example.locator('tui-select').click(); 18 | > 19 | await expect(page).toHaveScreenshot('dropdown-mobile-with-select.png'); | ^ 20 | }); 21 | }); 22 | at /Users/runner/work/taiga-ui/taiga-ui/projects/demo-playwright/tests/addon-mobile/mobile-dropdown/mobile-dropdown-with-textfield.pw.spec.ts:19:28

Check failure on line 19 in projects/demo-playwright/tests/addon-mobile/mobile-dropdown/mobile-dropdown-with-textfield.pw.spec.ts

View workflow job for this annotation

GitHub Actions / Playwright / macos-latest / 1 of 9

[webkit] › tests/addon-mobile/mobile-dropdown/mobile-dropdown-with-textfield.pw.spec.ts:12:9 › DropdownMobile for textfields › with select

1) [webkit] › tests/addon-mobile/mobile-dropdown/mobile-dropdown-with-textfield.pw.spec.ts:12:9 › DropdownMobile for textfields › with select Retry #2 ─────────────────────────────────────────────────────────────────────────────────────── Error: expect(page).toHaveScreenshot(expected) 31205 pixels (ratio 0.06 of all image pixels) are different. Expected: /Users/runner/work/taiga-ui/taiga-ui/projects/demo-playwright/snapshots/tests/addon-mobile/mobile-dropdown/mobile-dropdown-with-textfield.pw.spec.ts-snapshots/dropdown-mobile-with-select-webkit-darwin.png Received: /Users/runner/work/taiga-ui/taiga-ui/projects/demo-playwright/tests-results/tests-addon-mobile-mobile--75f60--for-textfields-with-select-webkit-retry2/dropdown-mobile-with-select-actual.png Diff: /Users/runner/work/taiga-ui/taiga-ui/projects/demo-playwright/tests-results/tests-addon-mobile-mobile--75f60--for-textfields-with-select-webkit-retry2/dropdown-mobile-with-select-diff.png Call log: - expect.toHaveScreenshot(dropdown-mobile-with-select.png) with timeout 5000ms - verifying given screenshot expectation - taking page screenshot - disabled all CSS animations - waiting for fonts to load... - fonts loaded - 31205 pixels (ratio 0.06 of all image pixels) are different. - waiting 100ms before taking screenshot - taking page screenshot - disabled all CSS animations - waiting for fonts to load... - fonts loaded - captured a stable screenshot - 31205 pixels (ratio 0.06 of all image pixels) are different. 17 | await example.locator('tui-select').click(); 18 | > 19 | await expect(page).toHaveScreenshot('dropdown-mobile-with-select.png'); | ^ 20 | }); 21 | }); 22 | at /Users/runner/work/taiga-ui/taiga-ui/projects/demo-playwright/tests/addon-mobile/mobile-dropdown/mobile-dropdown-with-textfield.pw.spec.ts:19:28
});
});
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,10 @@ import {DemoRoute} from '@demo/routes';
import {TuiDocumentationApiPagePO, tuiGoto} from '@demo-playwright/utils';
import {expect, test} from '@playwright/test';

import {
TUI_PLAYWRIGHT_MOBILE_USER_AGENT,
TUI_PLAYWRIGHT_MOBILE_VIEWPORT_HEIGHT,
TUI_PLAYWRIGHT_MOBILE_VIEWPORT_WIDTH,
} from '../../../playwright.options';
import {TUI_PLAYWRIGHT_MOBILE} from '../../../playwright.options';

test.describe('ActionBar', () => {
test.use({
viewport: {
width: TUI_PLAYWRIGHT_MOBILE_VIEWPORT_WIDTH,
height: TUI_PLAYWRIGHT_MOBILE_VIEWPORT_HEIGHT,
},
userAgent: TUI_PLAYWRIGHT_MOBILE_USER_AGENT,
});
test.use(TUI_PLAYWRIGHT_MOBILE);

test('works', async ({page}) => {
await tuiGoto(page, DemoRoute.ActionBar);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,7 @@
import type {Locator} from '@playwright/test';
import {expect, test} from '@playwright/test';

import {
TUI_PLAYWRIGHT_MOBILE_USER_AGENT,
TUI_PLAYWRIGHT_MOBILE_VIEWPORT_HEIGHT,
TUI_PLAYWRIGHT_MOBILE_VIEWPORT_WIDTH,
} from '../../../playwright.options';
import {TUI_PLAYWRIGHT_MOBILE} from '../../../playwright.options';

const {describe, beforeEach} = test;

Expand All @@ -25,14 +21,7 @@
let example!: Locator;
let mobileCalendar: TuiMobileDropdownPO;

test.use({
viewport: {
width: TUI_PLAYWRIGHT_MOBILE_VIEWPORT_WIDTH,
height: TUI_PLAYWRIGHT_MOBILE_VIEWPORT_HEIGHT,
},
userAgent: TUI_PLAYWRIGHT_MOBILE_USER_AGENT,
isMobile: true,
});
test.use(TUI_PLAYWRIGHT_MOBILE);

beforeEach(({page}) => {
example = new TuiDocumentationPagePO(page).getExample('#dropdown-mobile');
Expand All @@ -48,13 +37,13 @@

await expect(page.locator('tui-dropdown')).not.toBeAttached();
await expect(page.locator('tui-dropdown-mobile')).toBeVisible();
await expect(page).toHaveScreenshot(

Check failure on line 40 in projects/demo-playwright/tests/kit/dropdown-hover/dropdown-hover.pw.spec.ts

View workflow job for this annotation

GitHub Actions / Playwright / ubuntu-latest / 6 of 9

[chromium] › tests/kit/dropdown-hover/dropdown-hover.pw.spec.ts:33:17 › DropdownHover › Examples › With DropdownMobile › Opens mobile version of dropdown on the 1st time click

1) [chromium] › tests/kit/dropdown-hover/dropdown-hover.pw.spec.ts:33:17 › DropdownHover › Examples › With DropdownMobile › Opens mobile version of dropdown on the 1st time click Error: expect(page).toHaveScreenshot(expected) 5670 pixels (ratio 0.01 of all image pixels) are different. Expected: /home/runner/work/taiga-ui/taiga-ui/projects/demo-playwright/snapshots/tests/kit/dropdown-hover/dropdown-hover.pw.spec.ts-snapshots/mobile-dropdown-1st-time-time-click-chromium-linux.png Received: /home/runner/work/taiga-ui/taiga-ui/projects/demo-playwright/tests-results/tests-kit-dropdown-hover-d-6b1f1-pdown-on-the-1st-time-click-chromium/mobile-dropdown-1st-time-time-click-actual.png Diff: /home/runner/work/taiga-ui/taiga-ui/projects/demo-playwright/tests-results/tests-kit-dropdown-hover-d-6b1f1-pdown-on-the-1st-time-click-chromium/mobile-dropdown-1st-time-time-click-diff.png Call log: - expect.toHaveScreenshot(mobile-dropdown-1st-time-time-click.png) with timeout 5000ms - verifying given screenshot expectation - taking page screenshot - disabled all CSS animations - waiting for fonts to load... - fonts loaded - 5670 pixels (ratio 0.01 of all image pixels) are different. - waiting 100ms before taking screenshot - taking page screenshot - disabled all CSS animations - waiting for fonts to load... - fonts loaded - captured a stable screenshot - 5670 pixels (ratio 0.01 of all image pixels) are different. 38 | await expect(page.locator('tui-dropdown')).not.toBeAttached(); 39 | await expect(page.locator('tui-dropdown-mobile')).toBeVisible(); > 40 | await expect(page).toHaveScreenshot( | ^ 41 | 'mobile-dropdown-1st-time-time-click.png', 42 | ); 43 | }); at /home/runner/work/taiga-ui/taiga-ui/projects/demo-playwright/tests/kit/dropdown-hover/dropdown-hover.pw.spec.ts:40:36

Check failure on line 40 in projects/demo-playwright/tests/kit/dropdown-hover/dropdown-hover.pw.spec.ts

View workflow job for this annotation

GitHub Actions / Playwright / ubuntu-latest / 6 of 9

[chromium] › tests/kit/dropdown-hover/dropdown-hover.pw.spec.ts:33:17 › DropdownHover › Examples › With DropdownMobile › Opens mobile version of dropdown on the 1st time click

1) [chromium] › tests/kit/dropdown-hover/dropdown-hover.pw.spec.ts:33:17 › DropdownHover › Examples › With DropdownMobile › Opens mobile version of dropdown on the 1st time click Retry #1 ─────────────────────────────────────────────────────────────────────────────────────── Error: expect(page).toHaveScreenshot(expected) 5670 pixels (ratio 0.01 of all image pixels) are different. Expected: /home/runner/work/taiga-ui/taiga-ui/projects/demo-playwright/snapshots/tests/kit/dropdown-hover/dropdown-hover.pw.spec.ts-snapshots/mobile-dropdown-1st-time-time-click-chromium-linux.png Received: /home/runner/work/taiga-ui/taiga-ui/projects/demo-playwright/tests-results/tests-kit-dropdown-hover-d-6b1f1-pdown-on-the-1st-time-click-chromium-retry1/mobile-dropdown-1st-time-time-click-actual.png Diff: /home/runner/work/taiga-ui/taiga-ui/projects/demo-playwright/tests-results/tests-kit-dropdown-hover-d-6b1f1-pdown-on-the-1st-time-click-chromium-retry1/mobile-dropdown-1st-time-time-click-diff.png Call log: - expect.toHaveScreenshot(mobile-dropdown-1st-time-time-click.png) with timeout 5000ms - verifying given screenshot expectation - taking page screenshot - disabled all CSS animations - waiting for fonts to load... - fonts loaded - 5670 pixels (ratio 0.01 of all image pixels) are different. - waiting 100ms before taking screenshot - taking page screenshot - disabled all CSS animations - waiting for fonts to load... - fonts loaded - captured a stable screenshot - 5670 pixels (ratio 0.01 of all image pixels) are different. 38 | await expect(page.locator('tui-dropdown')).not.toBeAttached(); 39 | await expect(page.locator('tui-dropdown-mobile')).toBeVisible(); > 40 | await expect(page).toHaveScreenshot( | ^ 41 | 'mobile-dropdown-1st-time-time-click.png', 42 | ); 43 | }); at /home/runner/work/taiga-ui/taiga-ui/projects/demo-playwright/tests/kit/dropdown-hover/dropdown-hover.pw.spec.ts:40:36

Check failure on line 40 in projects/demo-playwright/tests/kit/dropdown-hover/dropdown-hover.pw.spec.ts

View workflow job for this annotation

GitHub Actions / Playwright / ubuntu-latest / 6 of 9

[chromium] › tests/kit/dropdown-hover/dropdown-hover.pw.spec.ts:33:17 › DropdownHover › Examples › With DropdownMobile › Opens mobile version of dropdown on the 1st time click

1) [chromium] › tests/kit/dropdown-hover/dropdown-hover.pw.spec.ts:33:17 › DropdownHover › Examples › With DropdownMobile › Opens mobile version of dropdown on the 1st time click Retry #2 ─────────────────────────────────────────────────────────────────────────────────────── Error: expect(page).toHaveScreenshot(expected) 5670 pixels (ratio 0.01 of all image pixels) are different. Expected: /home/runner/work/taiga-ui/taiga-ui/projects/demo-playwright/snapshots/tests/kit/dropdown-hover/dropdown-hover.pw.spec.ts-snapshots/mobile-dropdown-1st-time-time-click-chromium-linux.png Received: /home/runner/work/taiga-ui/taiga-ui/projects/demo-playwright/tests-results/tests-kit-dropdown-hover-d-6b1f1-pdown-on-the-1st-time-click-chromium-retry2/mobile-dropdown-1st-time-time-click-actual.png Diff: /home/runner/work/taiga-ui/taiga-ui/projects/demo-playwright/tests-results/tests-kit-dropdown-hover-d-6b1f1-pdown-on-the-1st-time-click-chromium-retry2/mobile-dropdown-1st-time-time-click-diff.png Call log: - expect.toHaveScreenshot(mobile-dropdown-1st-time-time-click.png) with timeout 5000ms - verifying given screenshot expectation - taking page screenshot - disabled all CSS animations - waiting for fonts to load... - fonts loaded - 5670 pixels (ratio 0.01 of all image pixels) are different. - waiting 100ms before taking screenshot - taking page screenshot - disabled all CSS animations - waiting for fonts to load... - fonts loaded - captured a stable screenshot - 5670 pixels (ratio 0.01 of all image pixels) are different. 38 | await expect(page.locator('tui-dropdown')).not.toBeAttached(); 39 | await expect(page.locator('tui-dropdown-mobile')).toBeVisible(); > 40 | await expect(page).toHaveScreenshot( | ^ 41 | 'mobile-dropdown-1st-time-time-click.png', 42 | ); 43 | }); at /home/runner/work/taiga-ui/taiga-ui/projects/demo-playwright/tests/kit/dropdown-hover/dropdown-hover.pw.spec.ts:40:36

Check failure on line 40 in projects/demo-playwright/tests/kit/dropdown-hover/dropdown-hover.pw.spec.ts

View workflow job for this annotation

GitHub Actions / Playwright / macos-latest / 6 of 9

[webkit] › tests/kit/dropdown-hover/dropdown-hover.pw.spec.ts:33:17 › DropdownHover › Examples › With DropdownMobile › Opens mobile version of dropdown on the 1st time click

1) [webkit] › tests/kit/dropdown-hover/dropdown-hover.pw.spec.ts:33:17 › DropdownHover › Examples › With DropdownMobile › Opens mobile version of dropdown on the 1st time click Error: expect(page).toHaveScreenshot(expected) 7747 pixels (ratio 0.02 of all image pixels) are different. Expected: /Users/runner/work/taiga-ui/taiga-ui/projects/demo-playwright/snapshots/tests/kit/dropdown-hover/dropdown-hover.pw.spec.ts-snapshots/mobile-dropdown-1st-time-time-click-webkit-darwin.png Received: /Users/runner/work/taiga-ui/taiga-ui/projects/demo-playwright/tests-results/tests-kit-dropdown-hover-d-6b1f1-pdown-on-the-1st-time-click-webkit/mobile-dropdown-1st-time-time-click-actual.png Diff: /Users/runner/work/taiga-ui/taiga-ui/projects/demo-playwright/tests-results/tests-kit-dropdown-hover-d-6b1f1-pdown-on-the-1st-time-click-webkit/mobile-dropdown-1st-time-time-click-diff.png Call log: - expect.toHaveScreenshot(mobile-dropdown-1st-time-time-click.png) with timeout 5000ms - verifying given screenshot expectation - taking page screenshot - disabled all CSS animations - waiting for fonts to load... - fonts loaded - 55154 pixels (ratio 0.09 of all image pixels) are different. - waiting 100ms before taking screenshot - taking page screenshot - disabled all CSS animations - waiting for fonts to load... - fonts loaded - 48745 pixels (ratio 0.08 of all image pixels) are different. - waiting 250ms before taking screenshot - taking page screenshot - disabled all CSS animations - waiting for fonts to load... - fonts loaded - captured a stable screenshot - 7747 pixels (ratio 0.02 of all image pixels) are different. 38 | await expect(page.locator('tui-dropdown')).not.toBeAttached(); 39 | await expect(page.locator('tui-dropdown-mobile')).toBeVisible(); > 40 | await expect(page).toHaveScreenshot( | ^ 41 | 'mobile-dropdown-1st-time-time-click.png', 42 | ); 43 | }); at /Users/runner/work/taiga-ui/taiga-ui/projects/demo-playwright/tests/kit/dropdown-hover/dropdown-hover.pw.spec.ts:40:36

Check failure on line 40 in projects/demo-playwright/tests/kit/dropdown-hover/dropdown-hover.pw.spec.ts

View workflow job for this annotation

GitHub Actions / Playwright / macos-latest / 6 of 9

[webkit] › tests/kit/dropdown-hover/dropdown-hover.pw.spec.ts:33:17 › DropdownHover › Examples › With DropdownMobile › Opens mobile version of dropdown on the 1st time click

1) [webkit] › tests/kit/dropdown-hover/dropdown-hover.pw.spec.ts:33:17 › DropdownHover › Examples › With DropdownMobile › Opens mobile version of dropdown on the 1st time click Retry #1 ─────────────────────────────────────────────────────────────────────────────────────── Error: expect(page).toHaveScreenshot(expected) 7747 pixels (ratio 0.02 of all image pixels) are different. Expected: /Users/runner/work/taiga-ui/taiga-ui/projects/demo-playwright/snapshots/tests/kit/dropdown-hover/dropdown-hover.pw.spec.ts-snapshots/mobile-dropdown-1st-time-time-click-webkit-darwin.png Received: /Users/runner/work/taiga-ui/taiga-ui/projects/demo-playwright/tests-results/tests-kit-dropdown-hover-d-6b1f1-pdown-on-the-1st-time-click-webkit-retry1/mobile-dropdown-1st-time-time-click-actual.png Diff: /Users/runner/work/taiga-ui/taiga-ui/projects/demo-playwright/tests-results/tests-kit-dropdown-hover-d-6b1f1-pdown-on-the-1st-time-click-webkit-retry1/mobile-dropdown-1st-time-time-click-diff.png Call log: - expect.toHaveScreenshot(mobile-dropdown-1st-time-time-click.png) with timeout 5000ms - verifying given screenshot expectation - taking page screenshot - disabled all CSS animations - waiting for fonts to load... - fonts loaded - 7747 pixels (ratio 0.02 of all image pixels) are different. - waiting 100ms before taking screenshot - taking page screenshot - disabled all CSS animations - waiting for fonts to load... - fonts loaded - captured a stable screenshot - 7747 pixels (ratio 0.02 of all image pixels) are different. 38 | await expect(page.locator('tui-dropdown')).not.toBeAttached(); 39 | await expect(page.locator('tui-dropdown-mobile')).toBeVisible(); > 40 | await expect(page).toHaveScreenshot( | ^ 41 | 'mobile-dropdown-1st-time-time-click.png', 42 | ); 43 | }); at /Users/runner/work/taiga-ui/taiga-ui/projects/demo-playwright/tests/kit/dropdown-hover/dropdown-hover.pw.spec.ts:40:36

Check failure on line 40 in projects/demo-playwright/tests/kit/dropdown-hover/dropdown-hover.pw.spec.ts

View workflow job for this annotation

GitHub Actions / Playwright / macos-latest / 6 of 9

[webkit] › tests/kit/dropdown-hover/dropdown-hover.pw.spec.ts:33:17 › DropdownHover › Examples › With DropdownMobile › Opens mobile version of dropdown on the 1st time click

1) [webkit] › tests/kit/dropdown-hover/dropdown-hover.pw.spec.ts:33:17 › DropdownHover › Examples › With DropdownMobile › Opens mobile version of dropdown on the 1st time click Retry #2 ─────────────────────────────────────────────────────────────────────────────────────── Error: expect(page).toHaveScreenshot(expected) 7747 pixels (ratio 0.02 of all image pixels) are different. Expected: /Users/runner/work/taiga-ui/taiga-ui/projects/demo-playwright/snapshots/tests/kit/dropdown-hover/dropdown-hover.pw.spec.ts-snapshots/mobile-dropdown-1st-time-time-click-webkit-darwin.png Received: /Users/runner/work/taiga-ui/taiga-ui/projects/demo-playwright/tests-results/tests-kit-dropdown-hover-d-6b1f1-pdown-on-the-1st-time-click-webkit-retry2/mobile-dropdown-1st-time-time-click-actual.png Diff: /Users/runner/work/taiga-ui/taiga-ui/projects/demo-playwright/tests-results/tests-kit-dropdown-hover-d-6b1f1-pdown-on-the-1st-time-click-webkit-retry2/mobile-dropdown-1st-time-time-click-diff.png Call log: - expect.toHaveScreenshot(mobile-dropdown-1st-time-time-click.png) with timeout 5000ms - verifying given screenshot expectation - taking page screenshot - disabled all CSS animations - waiting for fonts to load... - fonts loaded - 7747 pixels (ratio 0.02 of all image pixels) are different. - waiting 100ms before taking screenshot - taking page screenshot - disabled all CSS animations - waiting for fonts to load... - fonts loaded - captured a stable screenshot - 7747 pixels (ratio 0.02 of all image pixels) are different. 38 | await expect(page.locator('tui-dropdown')).not.toBeAttached(); 39 | await expect(page.locator('tui-dropdown-mobile')).toBeVisible(); > 40 | await expect(page).toHaveScreenshot( | ^ 41 | 'mobile-dropdown-1st-time-time-click.png', 42 | ); 43 | }); at /Users/runner/work/taiga-ui/taiga-ui/projects/demo-playwright/tests/kit/dropdown-hover/dropdown-hover.pw.spec.ts:40:36
'mobile-dropdown-1st-time-time-click.png',
);
});

test('Closes dropdown on click on overlay', async ({page, browserName}) => {
// TODO: why does this test keep failing in safari

Check notice on line 46 in projects/demo-playwright/tests/kit/dropdown-hover/dropdown-hover.pw.spec.ts

View check run for this annotation

codefactor.io / CodeFactor

projects/demo-playwright/tests/kit/dropdown-hover/dropdown-hover.pw.spec.ts#L46

Unexpected 'todo' comment: 'TODO: why does this test keep failing in...'. (no-warning-comments)
test.skip(
browserName !== 'chromium',
'This feature is only relevant in Chrome',
Expand All @@ -73,7 +62,7 @@
page,
browserName,
}) => {
// TODO: why does this test keep failing in safari

Check notice on line 65 in projects/demo-playwright/tests/kit/dropdown-hover/dropdown-hover.pw.spec.ts

View check run for this annotation

codefactor.io / CodeFactor

projects/demo-playwright/tests/kit/dropdown-hover/dropdown-hover.pw.spec.ts#L65

Unexpected 'todo' comment: 'TODO: why does this test keep failing in...'. (no-warning-comments)
test.skip(
browserName !== 'chromium',
'This feature is only relevant in Chrome',
Expand All @@ -85,7 +74,7 @@

await expect(page.locator('tui-dropdown-mobile')).toBeVisible();

await expect(page).toHaveScreenshot(

Check failure on line 77 in projects/demo-playwright/tests/kit/dropdown-hover/dropdown-hover.pw.spec.ts

View workflow job for this annotation

GitHub Actions / Playwright / ubuntu-latest / 6 of 9

[chromium] › tests/kit/dropdown-hover/dropdown-hover.pw.spec.ts:61:17 › DropdownHover › Examples › With DropdownMobile › Opens mobile version of dropdown on the 2nd time click

2) [chromium] › tests/kit/dropdown-hover/dropdown-hover.pw.spec.ts:61:17 › DropdownHover › Examples › With DropdownMobile › Opens mobile version of dropdown on the 2nd time click Error: expect(page).toHaveScreenshot(expected) 5670 pixels (ratio 0.01 of all image pixels) are different. Expected: /home/runner/work/taiga-ui/taiga-ui/projects/demo-playwright/snapshots/tests/kit/dropdown-hover/dropdown-hover.pw.spec.ts-snapshots/mobile-dropdown-2nd-time-time-click-chromium-linux.png Received: /home/runner/work/taiga-ui/taiga-ui/projects/demo-playwright/tests-results/tests-kit-dropdown-hover-d-a4a54-pdown-on-the-2nd-time-click-chromium/mobile-dropdown-2nd-time-time-click-actual.png Diff: /home/runner/work/taiga-ui/taiga-ui/projects/demo-playwright/tests-results/tests-kit-dropdown-hover-d-a4a54-pdown-on-the-2nd-time-click-chromium/mobile-dropdown-2nd-time-time-click-diff.png Call log: - expect.toHaveScreenshot(mobile-dropdown-2nd-time-time-click.png) with timeout 5000ms - verifying given screenshot expectation - taking page screenshot - disabled all CSS animations - waiting for fonts to load... - fonts loaded - 5670 pixels (ratio 0.01 of all image pixels) are different. - waiting 100ms before taking screenshot - taking page screenshot - disabled all CSS animations - waiting for fonts to load... - fonts loaded - captured a stable screenshot - 5670 pixels (ratio 0.01 of all image pixels) are different. 75 | await expect(page.locator('tui-dropdown-mobile')).toBeVisible(); 76 | > 77 | await expect(page).toHaveScreenshot( | ^ 78 | 'mobile-dropdown-2nd-time-time-click.png', 79 | ); 80 | }); at /home/runner/work/taiga-ui/taiga-ui/projects/demo-playwright/tests/kit/dropdown-hover/dropdown-hover.pw.spec.ts:77:36

Check failure on line 77 in projects/demo-playwright/tests/kit/dropdown-hover/dropdown-hover.pw.spec.ts

View workflow job for this annotation

GitHub Actions / Playwright / ubuntu-latest / 6 of 9

[chromium] › tests/kit/dropdown-hover/dropdown-hover.pw.spec.ts:61:17 › DropdownHover › Examples › With DropdownMobile › Opens mobile version of dropdown on the 2nd time click

2) [chromium] › tests/kit/dropdown-hover/dropdown-hover.pw.spec.ts:61:17 › DropdownHover › Examples › With DropdownMobile › Opens mobile version of dropdown on the 2nd time click Retry #1 ─────────────────────────────────────────────────────────────────────────────────────── Error: expect(page).toHaveScreenshot(expected) 5670 pixels (ratio 0.01 of all image pixels) are different. Expected: /home/runner/work/taiga-ui/taiga-ui/projects/demo-playwright/snapshots/tests/kit/dropdown-hover/dropdown-hover.pw.spec.ts-snapshots/mobile-dropdown-2nd-time-time-click-chromium-linux.png Received: /home/runner/work/taiga-ui/taiga-ui/projects/demo-playwright/tests-results/tests-kit-dropdown-hover-d-a4a54-pdown-on-the-2nd-time-click-chromium-retry1/mobile-dropdown-2nd-time-time-click-actual.png Diff: /home/runner/work/taiga-ui/taiga-ui/projects/demo-playwright/tests-results/tests-kit-dropdown-hover-d-a4a54-pdown-on-the-2nd-time-click-chromium-retry1/mobile-dropdown-2nd-time-time-click-diff.png Call log: - expect.toHaveScreenshot(mobile-dropdown-2nd-time-time-click.png) with timeout 5000ms - verifying given screenshot expectation - taking page screenshot - disabled all CSS animations - waiting for fonts to load... - fonts loaded - 5670 pixels (ratio 0.01 of all image pixels) are different. - waiting 100ms before taking screenshot - taking page screenshot - disabled all CSS animations - waiting for fonts to load... - fonts loaded - captured a stable screenshot - 5670 pixels (ratio 0.01 of all image pixels) are different. 75 | await expect(page.locator('tui-dropdown-mobile')).toBeVisible(); 76 | > 77 | await expect(page).toHaveScreenshot( | ^ 78 | 'mobile-dropdown-2nd-time-time-click.png', 79 | ); 80 | }); at /home/runner/work/taiga-ui/taiga-ui/projects/demo-playwright/tests/kit/dropdown-hover/dropdown-hover.pw.spec.ts:77:36

Check failure on line 77 in projects/demo-playwright/tests/kit/dropdown-hover/dropdown-hover.pw.spec.ts

View workflow job for this annotation

GitHub Actions / Playwright / ubuntu-latest / 6 of 9

[chromium] › tests/kit/dropdown-hover/dropdown-hover.pw.spec.ts:61:17 › DropdownHover › Examples › With DropdownMobile › Opens mobile version of dropdown on the 2nd time click

2) [chromium] › tests/kit/dropdown-hover/dropdown-hover.pw.spec.ts:61:17 › DropdownHover › Examples › With DropdownMobile › Opens mobile version of dropdown on the 2nd time click Retry #2 ─────────────────────────────────────────────────────────────────────────────────────── Error: expect(page).toHaveScreenshot(expected) 5670 pixels (ratio 0.01 of all image pixels) are different. Expected: /home/runner/work/taiga-ui/taiga-ui/projects/demo-playwright/snapshots/tests/kit/dropdown-hover/dropdown-hover.pw.spec.ts-snapshots/mobile-dropdown-2nd-time-time-click-chromium-linux.png Received: /home/runner/work/taiga-ui/taiga-ui/projects/demo-playwright/tests-results/tests-kit-dropdown-hover-d-a4a54-pdown-on-the-2nd-time-click-chromium-retry2/mobile-dropdown-2nd-time-time-click-actual.png Diff: /home/runner/work/taiga-ui/taiga-ui/projects/demo-playwright/tests-results/tests-kit-dropdown-hover-d-a4a54-pdown-on-the-2nd-time-click-chromium-retry2/mobile-dropdown-2nd-time-time-click-diff.png Call log: - expect.toHaveScreenshot(mobile-dropdown-2nd-time-time-click.png) with timeout 5000ms - verifying given screenshot expectation - taking page screenshot - disabled all CSS animations - waiting for fonts to load... - fonts loaded - 5670 pixels (ratio 0.01 of all image pixels) are different. - waiting 100ms before taking screenshot - taking page screenshot - disabled all CSS animations - waiting for fonts to load... - fonts loaded - captured a stable screenshot - 5670 pixels (ratio 0.01 of all image pixels) are different. 75 | await expect(page.locator('tui-dropdown-mobile')).toBeVisible(); 76 | > 77 | await expect(page).toHaveScreenshot( | ^ 78 | 'mobile-dropdown-2nd-time-time-click.png', 79 | ); 80 | }); at /home/runner/work/taiga-ui/taiga-ui/projects/demo-playwright/tests/kit/dropdown-hover/dropdown-hover.pw.spec.ts:77:36
'mobile-dropdown-2nd-time-time-click.png',
);
});
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
import {DemoRoute} from '@demo/routes';
import {
TuiDocumentationPagePO,
tuiGoto,
TuiInputPhoneInternationalPO,
} from '@demo-playwright/utils';
import type {Locator} from '@playwright/test';
import {expect, test} from '@playwright/test';

import {TUI_PLAYWRIGHT_MOBILE} from '../../../playwright.options';

const {describe, beforeEach} = test;

describe('InputPhoneInternational | With [tuiDropdownMobile]', () => {
let example: Locator;
let inputPhoneInternational: TuiInputPhoneInternationalPO;

test.use(TUI_PLAYWRIGHT_MOBILE);

beforeEach(async ({page}) => {
await tuiGoto(page, DemoRoute.InputPhoneInternational);

example = new TuiDocumentationPagePO(page).getExample('#mobile-dropdown');
inputPhoneInternational = new TuiInputPhoneInternationalPO(
example.locator('tui-textfield:has([tuiInputPhoneInternational])'),
);
});

test('opens mobile dropdown on select click', async ({page}) => {
await inputPhoneInternational.select.click();

await expect(page).toHaveScreenshot(

Check failure on line 32 in projects/demo-playwright/tests/kit/input-phone-international/phone-i18n-with-mobile-dropdown.pw.spec.ts

View workflow job for this annotation

GitHub Actions / Playwright / ubuntu-latest / 6 of 9

[chromium] › tests/kit/input-phone-international/phone-i18n-with-mobile-dropdown.pw.spec.ts:29:9 › InputPhoneInternational | With [tuiDropdownMobile] › opens mobile dropdown on select click

3) [chromium] › tests/kit/input-phone-international/phone-i18n-with-mobile-dropdown.pw.spec.ts:29:9 › InputPhoneInternational | With [tuiDropdownMobile] › opens mobile dropdown on select click Error: expect(page).toHaveScreenshot(expected) 27268 pixels (ratio 0.05 of all image pixels) are different. Expected: /home/runner/work/taiga-ui/taiga-ui/projects/demo-playwright/snapshots/tests/kit/input-phone-international/phone-i18n-with-mobile-dropdown.pw.spec.ts-snapshots/input-phone-international-with-mobile-dropdown-chromium-linux.png Received: /home/runner/work/taiga-ui/taiga-ui/projects/demo-playwright/tests-results/tests-kit-input-phone-inte-a2091-le-dropdown-on-select-click-chromium/input-phone-international-with-mobile-dropdown-actual.png Diff: /home/runner/work/taiga-ui/taiga-ui/projects/demo-playwright/tests-results/tests-kit-input-phone-inte-a2091-le-dropdown-on-select-click-chromium/input-phone-international-with-mobile-dropdown-diff.png Call log: - expect.toHaveScreenshot(input-phone-international-with-mobile-dropdown.png) with timeout 5000ms - verifying given screenshot expectation - taking page screenshot - disabled all CSS animations - waiting for fonts to load... - fonts loaded - 27268 pixels (ratio 0.05 of all image pixels) are different. - waiting 100ms before taking screenshot - taking page screenshot - disabled all CSS animations - waiting for fonts to load... - fonts loaded - captured a stable screenshot - 27268 pixels (ratio 0.05 of all image pixels) are different. 30 | await inputPhoneInternational.select.click(); 31 | > 32 | await expect(page).toHaveScreenshot( | ^ 33 | 'input-phone-international-with-mobile-dropdown.png', 34 | ); 35 | }); at /home/runner/work/taiga-ui/taiga-ui/projects/demo-playwright/tests/kit/input-phone-international/phone-i18n-with-mobile-dropdown.pw.spec.ts:32:28

Check failure on line 32 in projects/demo-playwright/tests/kit/input-phone-international/phone-i18n-with-mobile-dropdown.pw.spec.ts

View workflow job for this annotation

GitHub Actions / Playwright / ubuntu-latest / 6 of 9

[chromium] › tests/kit/input-phone-international/phone-i18n-with-mobile-dropdown.pw.spec.ts:29:9 › InputPhoneInternational | With [tuiDropdownMobile] › opens mobile dropdown on select click

3) [chromium] › tests/kit/input-phone-international/phone-i18n-with-mobile-dropdown.pw.spec.ts:29:9 › InputPhoneInternational | With [tuiDropdownMobile] › opens mobile dropdown on select click Retry #1 ─────────────────────────────────────────────────────────────────────────────────────── Error: expect(page).toHaveScreenshot(expected) 27268 pixels (ratio 0.05 of all image pixels) are different. Expected: /home/runner/work/taiga-ui/taiga-ui/projects/demo-playwright/snapshots/tests/kit/input-phone-international/phone-i18n-with-mobile-dropdown.pw.spec.ts-snapshots/input-phone-international-with-mobile-dropdown-chromium-linux.png Received: /home/runner/work/taiga-ui/taiga-ui/projects/demo-playwright/tests-results/tests-kit-input-phone-inte-a2091-le-dropdown-on-select-click-chromium-retry1/input-phone-international-with-mobile-dropdown-actual.png Diff: /home/runner/work/taiga-ui/taiga-ui/projects/demo-playwright/tests-results/tests-kit-input-phone-inte-a2091-le-dropdown-on-select-click-chromium-retry1/input-phone-international-with-mobile-dropdown-diff.png Call log: - expect.toHaveScreenshot(input-phone-international-with-mobile-dropdown.png) with timeout 5000ms - verifying given screenshot expectation - taking page screenshot - disabled all CSS animations - waiting for fonts to load... - fonts loaded - 27268 pixels (ratio 0.05 of all image pixels) are different. - waiting 100ms before taking screenshot - taking page screenshot - disabled all CSS animations - waiting for fonts to load... - fonts loaded - captured a stable screenshot - 27268 pixels (ratio 0.05 of all image pixels) are different. 30 | await inputPhoneInternational.select.click(); 31 | > 32 | await expect(page).toHaveScreenshot( | ^ 33 | 'input-phone-international-with-mobile-dropdown.png', 34 | ); 35 | }); at /home/runner/work/taiga-ui/taiga-ui/projects/demo-playwright/tests/kit/input-phone-international/phone-i18n-with-mobile-dropdown.pw.spec.ts:32:28

Check failure on line 32 in projects/demo-playwright/tests/kit/input-phone-international/phone-i18n-with-mobile-dropdown.pw.spec.ts

View workflow job for this annotation

GitHub Actions / Playwright / ubuntu-latest / 6 of 9

[chromium] › tests/kit/input-phone-international/phone-i18n-with-mobile-dropdown.pw.spec.ts:29:9 › InputPhoneInternational | With [tuiDropdownMobile] › opens mobile dropdown on select click

3) [chromium] › tests/kit/input-phone-international/phone-i18n-with-mobile-dropdown.pw.spec.ts:29:9 › InputPhoneInternational | With [tuiDropdownMobile] › opens mobile dropdown on select click Retry #2 ─────────────────────────────────────────────────────────────────────────────────────── Error: expect(page).toHaveScreenshot(expected) 27268 pixels (ratio 0.05 of all image pixels) are different. Expected: /home/runner/work/taiga-ui/taiga-ui/projects/demo-playwright/snapshots/tests/kit/input-phone-international/phone-i18n-with-mobile-dropdown.pw.spec.ts-snapshots/input-phone-international-with-mobile-dropdown-chromium-linux.png Received: /home/runner/work/taiga-ui/taiga-ui/projects/demo-playwright/tests-results/tests-kit-input-phone-inte-a2091-le-dropdown-on-select-click-chromium-retry2/input-phone-international-with-mobile-dropdown-actual.png Diff: /home/runner/work/taiga-ui/taiga-ui/projects/demo-playwright/tests-results/tests-kit-input-phone-inte-a2091-le-dropdown-on-select-click-chromium-retry2/input-phone-international-with-mobile-dropdown-diff.png Call log: - expect.toHaveScreenshot(input-phone-international-with-mobile-dropdown.png) with timeout 5000ms - verifying given screenshot expectation - taking page screenshot - disabled all CSS animations - waiting for fonts to load... - fonts loaded - 27268 pixels (ratio 0.05 of all image pixels) are different. - waiting 100ms before taking screenshot - taking page screenshot - disabled all CSS animations - waiting for fonts to load... - fonts loaded - captured a stable screenshot - 27268 pixels (ratio 0.05 of all image pixels) are different. 30 | await inputPhoneInternational.select.click(); 31 | > 32 | await expect(page).toHaveScreenshot( | ^ 33 | 'input-phone-international-with-mobile-dropdown.png', 34 | ); 35 | }); at /home/runner/work/taiga-ui/taiga-ui/projects/demo-playwright/tests/kit/input-phone-international/phone-i18n-with-mobile-dropdown.pw.spec.ts:32:28

Check failure on line 32 in projects/demo-playwright/tests/kit/input-phone-international/phone-i18n-with-mobile-dropdown.pw.spec.ts

View workflow job for this annotation

GitHub Actions / Playwright / macos-latest / 6 of 9

[webkit] › tests/kit/input-phone-international/phone-i18n-with-mobile-dropdown.pw.spec.ts:29:9 › InputPhoneInternational | With [tuiDropdownMobile] › opens mobile dropdown on select click

2) [webkit] › tests/kit/input-phone-international/phone-i18n-with-mobile-dropdown.pw.spec.ts:29:9 › InputPhoneInternational | With [tuiDropdownMobile] › opens mobile dropdown on select click Error: expect(page).toHaveScreenshot(expected) 27430 pixels (ratio 0.05 of all image pixels) are different. Expected: /Users/runner/work/taiga-ui/taiga-ui/projects/demo-playwright/snapshots/tests/kit/input-phone-international/phone-i18n-with-mobile-dropdown.pw.spec.ts-snapshots/input-phone-international-with-mobile-dropdown-webkit-darwin.png Received: /Users/runner/work/taiga-ui/taiga-ui/projects/demo-playwright/tests-results/tests-kit-input-phone-inte-a2091-le-dropdown-on-select-click-webkit/input-phone-international-with-mobile-dropdown-actual.png Diff: /Users/runner/work/taiga-ui/taiga-ui/projects/demo-playwright/tests-results/tests-kit-input-phone-inte-a2091-le-dropdown-on-select-click-webkit/input-phone-international-with-mobile-dropdown-diff.png Call log: - expect.toHaveScreenshot(input-phone-international-with-mobile-dropdown.png) with timeout 5000ms - verifying given screenshot expectation - taking page screenshot - disabled all CSS animations - waiting for fonts to load... - fonts loaded - 27430 pixels (ratio 0.05 of all image pixels) are different. - waiting 100ms before taking screenshot - taking page screenshot - disabled all CSS animations - waiting for fonts to load... - fonts loaded - captured a stable screenshot - 27430 pixels (ratio 0.05 of all image pixels) are different. 30 | await inputPhoneInternational.select.click(); 31 | > 32 | await expect(page).toHaveScreenshot( | ^ 33 | 'input-phone-international-with-mobile-dropdown.png', 34 | ); 35 | }); at /Users/runner/work/taiga-ui/taiga-ui/projects/demo-playwright/tests/kit/input-phone-international/phone-i18n-with-mobile-dropdown.pw.spec.ts:32:28

Check failure on line 32 in projects/demo-playwright/tests/kit/input-phone-international/phone-i18n-with-mobile-dropdown.pw.spec.ts

View workflow job for this annotation

GitHub Actions / Playwright / macos-latest / 6 of 9

[webkit] › tests/kit/input-phone-international/phone-i18n-with-mobile-dropdown.pw.spec.ts:29:9 › InputPhoneInternational | With [tuiDropdownMobile] › opens mobile dropdown on select click

2) [webkit] › tests/kit/input-phone-international/phone-i18n-with-mobile-dropdown.pw.spec.ts:29:9 › InputPhoneInternational | With [tuiDropdownMobile] › opens mobile dropdown on select click Retry #1 ─────────────────────────────────────────────────────────────────────────────────────── Error: expect(page).toHaveScreenshot(expected) 27753 pixels (ratio 0.05 of all image pixels) are different. Expected: /Users/runner/work/taiga-ui/taiga-ui/projects/demo-playwright/snapshots/tests/kit/input-phone-international/phone-i18n-with-mobile-dropdown.pw.spec.ts-snapshots/input-phone-international-with-mobile-dropdown-webkit-darwin.png Received: /Users/runner/work/taiga-ui/taiga-ui/projects/demo-playwright/tests-results/tests-kit-input-phone-inte-a2091-le-dropdown-on-select-click-webkit-retry1/input-phone-international-with-mobile-dropdown-actual.png Diff: /Users/runner/work/taiga-ui/taiga-ui/projects/demo-playwright/tests-results/tests-kit-input-phone-inte-a2091-le-dropdown-on-select-click-webkit-retry1/input-phone-international-with-mobile-dropdown-diff.png Call log: - expect.toHaveScreenshot(input-phone-international-with-mobile-dropdown.png) with timeout 5000ms - verifying given screenshot expectation - taking page screenshot - disabled all CSS animations - waiting for fonts to load... - fonts loaded - 27753 pixels (ratio 0.05 of all image pixels) are different. - waiting 100ms before taking screenshot - taking page screenshot - disabled all CSS animations - waiting for fonts to load... - fonts loaded - captured a stable screenshot - 27753 pixels (ratio 0.05 of all image pixels) are different. 30 | await inputPhoneInternational.select.click(); 31 | > 32 | await expect(page).toHaveScreenshot( | ^ 33 | 'input-phone-international-with-mobile-dropdown.png', 34 | ); 35 | }); at /Users/runner/work/taiga-ui/taiga-ui/projects/demo-playwright/tests/kit/input-phone-international/phone-i18n-with-mobile-dropdown.pw.spec.ts:32:28

Check failure on line 32 in projects/demo-playwright/tests/kit/input-phone-international/phone-i18n-with-mobile-dropdown.pw.spec.ts

View workflow job for this annotation

GitHub Actions / Playwright / macos-latest / 6 of 9

[webkit] › tests/kit/input-phone-international/phone-i18n-with-mobile-dropdown.pw.spec.ts:29:9 › InputPhoneInternational | With [tuiDropdownMobile] › opens mobile dropdown on select click

2) [webkit] › tests/kit/input-phone-international/phone-i18n-with-mobile-dropdown.pw.spec.ts:29:9 › InputPhoneInternational | With [tuiDropdownMobile] › opens mobile dropdown on select click Retry #2 ─────────────────────────────────────────────────────────────────────────────────────── Error: expect(page).toHaveScreenshot(expected) 27753 pixels (ratio 0.05 of all image pixels) are different. Expected: /Users/runner/work/taiga-ui/taiga-ui/projects/demo-playwright/snapshots/tests/kit/input-phone-international/phone-i18n-with-mobile-dropdown.pw.spec.ts-snapshots/input-phone-international-with-mobile-dropdown-webkit-darwin.png Received: /Users/runner/work/taiga-ui/taiga-ui/projects/demo-playwright/tests-results/tests-kit-input-phone-inte-a2091-le-dropdown-on-select-click-webkit-retry2/input-phone-international-with-mobile-dropdown-actual.png Diff: /Users/runner/work/taiga-ui/taiga-ui/projects/demo-playwright/tests-results/tests-kit-input-phone-inte-a2091-le-dropdown-on-select-click-webkit-retry2/input-phone-international-with-mobile-dropdown-diff.png Call log: - expect.toHaveScreenshot(input-phone-international-with-mobile-dropdown.png) with timeout 5000ms - verifying given screenshot expectation - taking page screenshot - disabled all CSS animations - waiting for fonts to load... - fonts loaded - 27430 pixels (ratio 0.05 of all image pixels) are different. - waiting 100ms before taking screenshot - taking page screenshot - disabled all CSS animations - waiting for fonts to load... - fonts loaded - 323 pixels (ratio 0.01 of all image pixels) are different. - waiting 250ms before taking screenshot - taking page screenshot - disabled all CSS animations - waiting for fonts to load... - fonts loaded - captured a stable screenshot - 27753 pixels (ratio 0.05 of all image pixels) are different. 30 | await inputPhoneInternational.select.click(); 31 | > 32 | await expect(page).toHaveScreenshot( | ^ 33 | 'input-phone-international-with-mobile-dropdown.png', 34 | ); 35 | }); at /Users/runner/work/taiga-ui/taiga-ui/projects/demo-playwright/tests/kit/input-phone-international/phone-i18n-with-mobile-dropdown.pw.spec.ts:32:28
'input-phone-international-with-mobile-dropdown.png',
);
});

test('textfield inside dropdown is focused on dropdown open', async () => {
await inputPhoneInternational.select.click();

await expect(
inputPhoneInternational.dropdown.locator('tui-textfield input'),
).toBeFocused();
});

test('items is filtered by textfield inside dropdown', async () => {
await inputPhoneInternational.select.click();
await inputPhoneInternational.dropdown
.locator('tui-textfield input')
.fill('aust');

const options = await inputPhoneInternational.getOptions();

expect(options).toHaveLength(2);
await expect(options[0]!).toContainText('Australia');
await expect(options[1]!).toContainText('Austria');
});
});
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,7 @@ import {DemoRoute} from '@demo/routes';
import type {Locator} from '@playwright/test';
import {expect, test} from '@playwright/test';

import {
TUI_PLAYWRIGHT_MOBILE_USER_AGENT,
TUI_PLAYWRIGHT_MOBILE_VIEWPORT_HEIGHT,
TUI_PLAYWRIGHT_MOBILE_VIEWPORT_WIDTH,
} from '../../../playwright.options';
import {TUI_PLAYWRIGHT_MOBILE} from '../../../playwright.options';
import {
CHAR_NO_BREAK_SPACE,
TuiCalendarPO,
Expand Down Expand Up @@ -235,13 +231,7 @@ test.describe('InputDateRange', () => {
});

test.describe('Mobile emulation', () => {
test.use({
viewport: {
width: TUI_PLAYWRIGHT_MOBILE_VIEWPORT_WIDTH,
height: TUI_PLAYWRIGHT_MOBILE_VIEWPORT_HEIGHT,
},
userAgent: TUI_PLAYWRIGHT_MOBILE_USER_AGENT,
});
test.use(TUI_PLAYWRIGHT_MOBILE);

let mobileCalendar!: TuiMobileCalendarPO;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,10 @@ import {DemoRoute} from '@demo/routes';
import {tuiGoto} from '@demo-playwright/utils';
import {expect, test} from '@playwright/test';

import {
TUI_PLAYWRIGHT_MOBILE_USER_AGENT,
TUI_PLAYWRIGHT_MOBILE_VIEWPORT_HEIGHT,
TUI_PLAYWRIGHT_MOBILE_VIEWPORT_WIDTH,
} from '../../../playwright.options';
import {TUI_PLAYWRIGHT_MOBILE} from '../../../playwright.options';

test.describe('Select', () => {
test.use({
viewport: {
width: TUI_PLAYWRIGHT_MOBILE_VIEWPORT_WIDTH,
height: TUI_PLAYWRIGHT_MOBILE_VIEWPORT_HEIGHT,
},
userAgent: TUI_PLAYWRIGHT_MOBILE_USER_AGENT,
});
test.use(TUI_PLAYWRIGHT_MOBILE);

test('native select value', async ({page}) => {
await tuiGoto(page, DemoRoute.Select);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@

export class TuiTextfieldWithDataListPO {
public readonly textfield: Locator = this.host.getByRole('textbox');
public readonly dropdown = this.host.page().locator('tui-dropdown');
public readonly dropdown = this.host
.page()
.locator('tui-dropdown,tui-dropdown-mobile');

constructor(protected readonly host: Locator) {}

Expand All @@ -23,7 +25,7 @@

public async scrollDropdown(x: number, y: number): Promise<void>;
public async scrollDropdown(options?: ScrollToOptions): Promise<void>;
public async scrollDropdown(...args: any[]): Promise<void> {

Check warning on line 28 in projects/demo-playwright/utils/page-objects/textfield-with-data-list.po.ts

View check run for this annotation

codefactor.io / CodeFactor

projects/demo-playwright/utils/page-objects/textfield-with-data-list.po.ts#L28

Unexpected any. Specify a different type. (@typescript-eslint/no-explicit-any)
await this.dropdown
.locator('tui-scrollbar')
.evaluate((el, args) => el.scrollTo(...args), args);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
margin: 0 -1rem;
white-space: nowrap;
overflow: hidden;
border-radius: 0;
}

.button {
Expand Down
Loading