gnomad-browser
gnomad-browser copied to clipboard
Integration test frontend code using recorded production API data
We have recently added snapshot integration tests, but the ones we have to date have fake data in them. For a more realistic test, we could capture real responses to API requests and add snapshot tests that render that data. One potential tool to facilitate this: https://github.com/ijpiantanida/talkback.
The team decided this is a high priority and will help us systematically check data & API changes.
A solution was discussed that simulates the way we currently use demo deployments, but instead does not rely on our internal users.
- Install something like Playwright
- Enable codegen recording and click through important pages and elements (See: https://playwright.dev/docs/codegen)
- Deploy a demo instance with new data/API changes
- Set the API environment variable
GNOMAD_API_URLto the one used by this demo deployment - Run integration tests
Ideally this happens in CI.
Related: #1479