-
Notifications
You must be signed in to change notification settings - Fork 3
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 e2e tests #206
base: main
Are you sure you want to change the base?
Add e2e tests #206
Conversation
This pull request is being automatically deployed with Vercel (learn more). 🔍 Inspect: https://vercel.com/codeforafrica/promisetracker/1661nl9o8 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍🏾 @gertie-sheshe .
How do we automate the testing then i.e. how do we make sure (all) tests run and pass whenever a new PR is created/before a PR is merged to main
?
describe("Act Now page", () => { | ||
it("renders Act Now page", () => { | ||
cy.visit("/"); | ||
cy.get("[data-cy=navigation-buttons]").contains("Act Now").click(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Have we modified the navigation buttons to contain data-cy=navigation-buttons
? This fails when I run locally.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes. The fail is probably from a timeout issue
@@ -0,0 +1,25 @@ | |||
// *********************************************** |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need empty files like these?
it("filter stalled promises", () => { | ||
cy.get("[data-cy=promises-section]") | ||
.find("img") | ||
.its("length") | ||
.then((length) => { | ||
expect(length).to.equal(5); | ||
}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If I'm getting this correct, it means everytime the PromiseTracker team add/remove promises in Check, these tests will fail. Correct?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Precisely. That's the problem I have at the moment, since I am using production database it is bound to change any time. And how to mock that data is a challenge on Cypress as it runs on the client side and the pages are SSR - so they already come with the data.
Description
Adding end to end tests
Fixes #175888269
Type of change
Please delete options that are not relevant.
Desktop Screenshots
Mobile Screenshots
Checklist: