From 2312657555db98ded733cee8ebefb8a77259fbc2 Mon Sep 17 00:00:00 2001 From: Linus Brombacher Date: Thu, 1 Oct 2026 13:48:55 +0200 Subject: [PATCH] fix siteplan tests utils --- web/siteplan/tests/utils.ts | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/web/siteplan/tests/utils.ts b/web/siteplan/tests/utils.ts index 189ab09d13..e341757af6 100644 --- a/web/siteplan/tests/utils.ts +++ b/web/siteplan/tests/utils.ts @@ -1,4 +1,4 @@ -import { Page } from '@playwright/test' +import { expect, Page } from '@playwright/test' import configuration from '../public/configuration.json' with { type: 'json' } import pphn from './data/PPHN_1.10.0.3_01-02_Ibn-Z._-_2._AeM_2022-05-17_13-44_tg3.json' with { type: 'json' } @@ -15,7 +15,5 @@ export async function loadSiteplan (page: Page) { await page.goto('/') // ensure that .loading shows up and disappears again - await page.locator('.loading').waitFor({ state: 'visible', timeout: 10_000 }) - - await page.locator('.loading').waitFor({ state: 'hidden', timeout: 10_000 }) + await expect(page.locator('.loading')).toHaveCSS('visibility', 'hidden', { timeout: 10_000 }) }