From 424e980310ef652618ca4fc6d41cab229a7d249f Mon Sep 17 00:00:00 2001 From: VidhiRambhia Date: Sat, 2 Dec 2023 21:03:28 -0600 Subject: [PATCH] chore(demo-playwright): test for landing page --- .../demo-cypress/cypress/tests/demo/landing.cy.ts | 6 ------ projects/demo-playwright/tests/demo/landing.spec.ts | 13 +++++++++++++ 2 files changed, 13 insertions(+), 6 deletions(-) delete mode 100644 projects/demo-cypress/cypress/tests/demo/landing.cy.ts create mode 100644 projects/demo-playwright/tests/demo/landing.spec.ts diff --git a/projects/demo-cypress/cypress/tests/demo/landing.cy.ts b/projects/demo-cypress/cypress/tests/demo/landing.cy.ts deleted file mode 100644 index 074b1d27dfaa..000000000000 --- a/projects/demo-cypress/cypress/tests/demo/landing.cy.ts +++ /dev/null @@ -1,6 +0,0 @@ -describe(`Landing`, () => { - it(`take snapshot`, () => { - cy.viewport(360, 740).tuiVisit(`/`, {waitAllIcons: false}); - cy.matchImageSnapshot(`landing-360-740`); - }); -}); diff --git a/projects/demo-playwright/tests/demo/landing.spec.ts b/projects/demo-playwright/tests/demo/landing.spec.ts new file mode 100644 index 000000000000..36b12614cd46 --- /dev/null +++ b/projects/demo-playwright/tests/demo/landing.spec.ts @@ -0,0 +1,13 @@ +import {tuiGoto} from '@demo-playwright/utils'; +import {expect, test} from '@playwright/test'; + +test.describe(`Landing`, () => { + test.use({ + viewport: {width: 360, height: 740}, + }); + + test(`take snapshot`, async ({page}) => { + await tuiGoto(page, `/`, {hideHeader: false}); + await expect(page).toHaveScreenshot(`landing-360-740.png`); + }); +});