From beb3bcb97c26a378c272ea52b2b950cc8a89c019 Mon Sep 17 00:00:00 2001 From: MechaCat02 Date: Thu, 28 May 2026 19:41:47 +0200 Subject: [PATCH] fix(e2e): use uniqueUsername helper in integration.spec Date.now() can collide across workers running on the same millisecond boundary. The worker-aware helper that the rest of the suite uses side-steps that without changing the test's intent. Co-Authored-By: Claude Opus 4.7 (1M context) --- dashboard/tests/e2e/integration/integration.spec.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/dashboard/tests/e2e/integration/integration.spec.ts b/dashboard/tests/e2e/integration/integration.spec.ts index de1edfc..5b3ef18 100644 --- a/dashboard/tests/e2e/integration/integration.spec.ts +++ b/dashboard/tests/e2e/integration/integration.spec.ts @@ -87,9 +87,12 @@ test('end-to-end: app + domain + script + route via dashboard → invoke via pub }); test('api key minted via dashboard works as a CLI bearer, then revoke disables it', async ({ - page + page, + uniqueUsername }) => { - const name = `e2e-cli-${Date.now()}`; + // Worker-aware unique helper instead of Date.now() — keeps two + // workers from minting the same name on the same millisecond. + const name = uniqueUsername('cli'); // 1. Mint the key from /profile and capture the revealed token. await page.goto('/admin/profile');