Visual e2e tests wait on map animations

Open
#943 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
45/100
Issue type
Refactor
Clarity
Mostly clear
Activity status
Active
Tech stack
typescript

Research direction

Start with the animation timers in useMapViewControls.ts and the MapControl component that the visual e2e tests wait on. Find where the animation duration is set, and check how the visual tests currently wait for the map before each screenshot. Done means the map accepts a zero duration under tests, the visual suite runs without the fixed wait, and the screenshots still pass.

Written by the indexing model from the issue text.

Description

enhancement
Description

The visual e2e tests spend a fixed amount of time waiting for the map to finish animating before each screenshot. The animations are OpenLayers JS timers in useMapViewControls.ts, so Playwright's animations: 'disabled' has no effect and the tests can't shorten them from the outside.

Each visual run is about 70s per browser, and roughly 10s of that is these waits.

Possible approach:

  • Let the map component accept a zero animation duration when running under tests (for example via a prop or a test-only flag), so MapControl can wait only for the map to render.

Ref: https://github.com/getodk/central-frontend/pull/1947#issuecomment-6198229387

Dominant language
TypeScript
Stars
38
Forks
24
PR merge metrics
No merged PRs in 30d

Getting set up

  • No Dockerfile or Docker Compose file
  • Has a pull request template
  • No contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from getodk/web-forms

All issues in getodk/web-forms

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.