MicheleBertoli / MicheleBertoli/react-gmaps
E2E testing for components
- Dominant language
- JavaScript
- Stars
- 316
- Forks
- 63
- PR merge metrics
- No merged PRs in 30d
Description
Even though we have a few tests for the `src/lib/` folder - which contains essential internals - we also need to test the rendering of the components when added to the map.
I tried to setup visual regression testing with Vitest and JSDom (see https://github.com/MicheleBertoli/react-gmaps/pull/130#issuecomment-1636891538) but it seems to be a dead end as Google Maps won't render in JSDom.
@MicheleBertoli is currently exploring Cypress, which seems more promising https://github.com/MicheleBertoli/react-gmaps/pull/130#issuecomment-1712473981
One question stands, how can we test animated components? Visual regression in JSDom with the right thresholds seemed like a good option IMO, but it won't work. Maybe the [current unit tests](https://github.com/MicheleBertoli/react-gmaps/blob/feat/v2.0/src/lib/geo/interpolation.test.ts) are enough, since animated components inherits from base components?
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by reviewing the existing tests under src/lib/, especially src/lib/geo/interpolation.test.ts, and the discussion of Vitest, JSDOM, and Cypress linked in the issue. Investigate whether Cypress can render components on a Google Map and determine how animated components should be covered. Done means establishing a workable end-to-end testing approach for component rendering and clarifying animated-component coverage.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cypress, javascript, react
- Domain
- frontend, testing
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100