Skip to content

Commit

Permalink
chore(demo-playwright): CalendarSheet create inside test
Browse files Browse the repository at this point in the history
  • Loading branch information
mdlufy committed Oct 24, 2024
1 parent ac587f1 commit 24d5ba7
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import {DemoRoute} from '@demo/routes';
import {
TuiCalendarPO,
TuiCalendarSheetPO,
TuiDocumentationPagePO,
tuiGoto,
TuiInputDatePO,
Expand Down Expand Up @@ -61,7 +60,6 @@ test.describe('InputDate', () => {

let inputDate!: TuiInputDatePO;
let calendar!: TuiCalendarPO;
let calendarSheet!: TuiCalendarSheetPO;

test.use({
viewport: {
Expand All @@ -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) => {
Expand Down Expand Up @@ -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');
});
Expand Down

0 comments on commit 24d5ba7

Please sign in to comment.