Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add playwright #37

Merged
merged 5 commits into from
Sep 16, 2024
Merged

Add playwright #37

merged 5 commits into from
Sep 16, 2024

Conversation

richpjames
Copy link
Contributor

@richpjames richpjames commented Sep 13, 2024

We want to ensure that changes committed aren't breaking things.
The functionality is trivial at the moment but soon (#36) we will introduce sorting. We will want to be able to test this.
This PR introduces Playwright for E2E tests.
Rather than seed the app with live data which will be hard to assert on we seed it with test data.

@richpjames richpjames force-pushed the add-e2es branch 2 times, most recently from 1da22a6 to 805b69c Compare September 13, 2024 13:21
rich added 2 commits September 13, 2024 14:47
We're not using these so I'm not sure we need them here?
I don't think this does anything?
And by removing it we can avoid having to call the Github API except
when seeding data which makes running the tests a bit easier
@richpjames richpjames force-pushed the add-e2es branch 4 times, most recently from a116b1e to dd49fe6 Compare September 13, 2024 14:08
This adds the packages, config and a github action to run the tests
rich added 2 commits September 16, 2024 07:52
This adds a seeding job.
Using live data is hard to assert against and means we have to run the
seeding job which takes time and uses rate-limit tokens.
Instead we copy across some test data we can use. This means the data
will always be consistent and we can test against it more easily.
We can't do this in a setup job [as Playwright
recommends](https://playwright.dev/docs/test-global-setup-teardown)
because the app depends on the JSON existing before it can start.
Instead we have to copy and paste the seed data across before we start
the app.
This is trivial for now but once we have some functionality it will be
more interesting
@richpjames richpjames merged commit c294af0 into main Sep 16, 2024
3 checks passed
@richpjames richpjames deleted the add-e2es branch September 16, 2024 06:54
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.

2 participants