From 24d5ba77fbf9c7280d0a67f0d58915d648ff4d3d Mon Sep 17 00:00:00 2001 From: mdlufy Date: Thu, 24 Oct 2024 12:50:37 +0300 Subject: [PATCH] chore(demo-playwright): `CalendarSheet` create inside test --- .../tests/legacy/input-date/input-date.spec.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/projects/demo-playwright/tests/legacy/input-date/input-date.spec.ts b/projects/demo-playwright/tests/legacy/input-date/input-date.spec.ts index 4c38b19d9bb8..283843ae420c 100644 --- a/projects/demo-playwright/tests/legacy/input-date/input-date.spec.ts +++ b/projects/demo-playwright/tests/legacy/input-date/input-date.spec.ts @@ -1,7 +1,6 @@ import {DemoRoute} from '@demo/routes'; import { TuiCalendarPO, - TuiCalendarSheetPO, TuiDocumentationPagePO, tuiGoto, TuiInputDatePO, @@ -61,7 +60,6 @@ test.describe('InputDate', () => { let inputDate!: TuiInputDatePO; let calendar!: TuiCalendarPO; - let calendarSheet!: TuiCalendarSheetPO; test.use({ viewport: { @@ -77,7 +75,6 @@ test.describe('InputDate', () => { inputDate = new TuiInputDatePO(example.locator('tui-input-date')); calendar = new TuiCalendarPO(inputDate.calendar); - calendarSheet = new TuiCalendarSheetPO(inputDate.calendar); }); ['s', 'm', 'l'].forEach((size) => { @@ -176,7 +173,10 @@ test.describe('InputDate', () => { await calendar.itemButton.click(); await inputDate.textfield.click(); - await calendarSheet.clickOnDay(1); + + const [calendarSheet] = await calendar.getCalendarSheets(); + + await calendarSheet?.clickOnDay(1); await expect(inputDate.textfield).toHaveScreenshot('10-input-date.png'); });