Open ermish opened 1 month ago
@ermish is this separate to the quick fix to keep it from posting submissions. Or do you want this all to be the same PR?
Likely separate, but the quick fix could reference this as this is a bit broader. I think it depends on if you're doing a quick hack for the submissions or if you're trying to do a proper cypress mock
Problem
Our cypress tests are running against the api and every test is pulling fresh data which can accrue costs and eat our bandwith limits for our API + Databases. To solve this, we can have cypress run against fake data and not call the API. Cypress has a guide to this
To ensure we can still connect to the API successfully, we should be able to toggle between the real API or fake data.
Success
We can run against fake data or connect to the API with a simple toggle
Requirements
graphql.ts
to have a boolean that uses this fake data or the real api call.yarn test
andyarn test:realdata