From defa9b2263857a8e0a1d052dc73f30b0cd45cc25 Mon Sep 17 00:00:00 2001 From: spwoodcock Date: Wed, 27 Nov 2024 04:34:35 +0000 Subject: [PATCH] test: fix mapper flow tests, first open page, then click card --- src/frontend/e2e/02-mapper-flow.spec.ts | 8 +------- src/frontend/e2e/helpers.ts | 1 + 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/src/frontend/e2e/02-mapper-flow.spec.ts b/src/frontend/e2e/02-mapper-flow.spec.ts index 87f17e618f..031fcf29f9 100644 --- a/src/frontend/e2e/02-mapper-flow.spec.ts +++ b/src/frontend/e2e/02-mapper-flow.spec.ts @@ -104,12 +104,9 @@ test.describe('mapper flow', () => { // (playwright.config.ts is configured to run all browsers by default) test.skip(browserName !== 'chromium', 'Test only for chromium!'); - // 0. Temp Login - await tempLogin(page); - await openTestProject(page); - // 1. Click on task area on map // click on task & assert task popup visibility + await openTestProject(page); await page.locator('canvas').click({ position: { x: 388, @@ -173,10 +170,7 @@ test.describe('mapper flow', () => { // (playwright.config.ts is configured to run all browsers by default) test.skip(browserName !== 'chromium', 'Test only for chromium!'); - // 0. Temp Login - await tempLogin(page); await openTestProject(page); - await page.locator('canvas').click({ position: { x: 475, diff --git a/src/frontend/e2e/helpers.ts b/src/frontend/e2e/helpers.ts index 54b9b92fe9..7c11160181 100644 --- a/src/frontend/e2e/helpers.ts +++ b/src/frontend/e2e/helpers.ts @@ -1,6 +1,7 @@ import { Page } from '@playwright/test'; export async function openTestProject(page: Page) { + await page.goto('/'); // open project card with regex text 'Project Create Playwright xxx' await page .getByText(/^Project Create Playwright/)