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.
This commit is contained in:
Maurice
2026-09-04 19:56:05 +02:00
committed by Maurice
parent 981cf0a143
commit f81aaa9f4b
+7
View File
@@ -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';