From 52df528994ed7bc20b27539fffb2dbdbdfc54b24 Mon Sep 17 00:00:00 2001 From: kristianwind Date: Thu, 3 Sep 2026 12:00:02 +0200 Subject: [PATCH] =?UTF-8?q?test(e2e):=20retry=20the=20project=E2=86=92grou?= =?UTF-8?q?p=20drop=20until=20it=20nests?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit A native HTML5 drag occasionally does not register under CI load, leaving the group empty and the group-page assertion failing for a reason unrelated to the test. Retry the drop until the project actually sits under the group. Co-Authored-By: Claude Opus 4.8 --- web/e2e/smoke.spec.js | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/web/e2e/smoke.spec.js b/web/e2e/smoke.spec.js index 87ba42e..c20539b 100644 --- a/web/e2e/smoke.spec.js +++ b/web/e2e/smoke.spec.js @@ -1525,9 +1525,18 @@ test('en gruppe er en side med sine projekter, en beskrivelse og filer', async ( // Into the group, then onto its page — which is what the heading is a link to // now. The chevron beside it still folds; they are two intentions and the old // single target could only serve the smaller one. - await sidebar - .getByRole('link', { name: 'Drejebænk' }) - .dragTo(sidebar.getByRole('link', { name: 'Værksted' })); + // + // The drop is retried until the project actually nests under the group: a native + // HTML5 drag occasionally does not register the first time under CI load, and a + // single dragTo then leaves the group empty and the page assertion failing for a + // reason that has nothing to do with what the test is about. + const nested = sidebar.locator('.folder > a').filter({ hasText: 'Drejebænk' }); + await expect(async () => { + await sidebar + .getByRole('link', { name: 'Drejebænk' }) + .dragTo(sidebar.getByRole('link', { name: 'Værksted' })); + await expect(nested).toHaveCount(1, { timeout: 1000 }); + }).toPass({ timeout: 10000 }); await sidebar.getByRole('link', { name: 'Værksted' }).click(); await expect(page.getByRole('heading', { name: 'Værksted', level: 1 })).toBeVisible();