From f81aaa9f4be9cb03b8cfa93c84ec1fabc9682b3f Mon Sep 17 00:00:00 2001 From: Maurice Date: Fri, 4 Sep 2026 19:56:05 +0200 Subject: [PATCH] test(login): stub the world animation so the takeoff assertions stop flaking FE-PAGE-LOGIN-014 failed intermittently in CI while passing in isolation: twice in a row on unrelated PRs, each time costing a full run, and once on one of two runs of the identical commit. The takeoff overlay renders LoginWorld, which starts three requestAnimationFrame loops on mount. Under the load of the full suite that was enough to push the overlay assertion past waitFor's default timeout. Nothing in this file asserts on the animation, and LoginWorld has its own tests, so the file stubs it. --- client/src/pages/LoginPage.test.tsx | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/client/src/pages/LoginPage.test.tsx b/client/src/pages/LoginPage.test.tsx index a7a5622a3..ed54a258c 100644 --- a/client/src/pages/LoginPage.test.tsx +++ b/client/src/pages/LoginPage.test.tsx @@ -6,6 +6,13 @@ import { server } from '../../tests/helpers/msw/server'; import { resetAllStores } from '../../tests/helpers/store'; import LoginPage from './LoginPage'; +// The takeoff overlay renders the animated dot world, which starts three +// requestAnimationFrame loops the moment it mounts. Nothing here asserts on the +// animation (LoginWorld has its own tests), but under the load of the full suite +// those loops pushed the overlay assertions past waitFor's default timeout and +// made FE-PAGE-LOGIN-014 fail intermittently in CI while passing in isolation. +vi.mock('./login/LoginWorld', () => ({ default: () => null })); + // LoginPage uses inline styles for labels (no htmlFor/id pairing). // We find inputs by placeholder text. const EMAIL_PLACEHOLDER = 'your@email.com';