Skip to content

test(browser): wait for menu animations before measuring Filter level… - #979

Open
harshita-jangra wants to merge 1 commit into
eizedev:mainfrom
harshita-jangra:test-levels-filter-animation-stability
Open

harshita-jangra wants to merge 1 commit into
eizedev:mainfrom
harshita-jangra:test-levels-filter-animation-stability

Conversation

@harshita-jangra

Copy link
Copy Markdown
Contributor

Summary

Fixes #961

Wait for the Filter level menu animations to finish before measuring its position. This prevents the opening animation from causing timing-dependent position shifts while preserving the existing two-frame layout wait and strict < 2 px assertion.

Whole-change check

Code — tests/browser/levels.spec.js

  • Job now: The settled helper waits for two animation frames and then waits for all animations on the menu and its descendants to finish before the position is measured.
  • Extracted or reused: Reused the existing page and menu objects and the Web Animations API's getAnimations() and finished properties. No new helper or production code was needed.
  • Why the rest fits as it is: The existing test setup and < 2 px assertion already express the intended behavior. Only the timing of the measurement needed to change.

Checklist

Test plan

  • Targeted Filter level Playwright tests: 2 passed.
  • Targeted tests after a fresh playground build: 2 passed.
  • Supporting tests: 4 passed.
  • npm run lint: passed.
  • npm run types: passed.
  • npm run growth: passed.
  • git diff --check: passed.

Note: The earlier full Node test run had two unrelated baseline failures: tests/audit-signatures.test.js (ENOENT /count) and tests/ci.test.js (missing packages/pivotkit-report/package.json on the base branch).

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

levels.spec Filter level test measures the menu during its opening animation

1 participant