-
Notifications
You must be signed in to change notification settings - Fork 73
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
set up tests for validating various domains #4960
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 1 Ignored Deployment
|
Passing run #8170 ↗︎
Details:
Review all test suite changes for PR #4960 ↗︎ |
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.
This is smart!
One minor suggestion is that, sometimes when I write little "leave-behind" tests like this, I like to write something to sanity-check the test preconditions where possible? Basically something that would fail really fast and obviously if you missed the comment and never configured /etc/hosts
, because I suspect the test failures that will happen here if you run this without that setup would be a bit cryptic.
Something like...
it("has a locally configured /etc/hosts file containing the domains.json for testing", () => {
# Visit first domain and check that it loads! If this fails, see instructions above.
cy.request(`http://${domains[0]}:3001`).should(...<check it resolves to localhost?>)
});
the idea is that test gives a really clear failure
@NevilleS while I love that idea, unfortunately there's not a convenient way to stop the rest from running if that first test fails. Since the easiest way to run that test is by simply using |
That's fair. The closest thing you have in Cypress is |
Passing run #8174 ↗︎
Details:
Review all test suite changes for PR #4960 ↗︎ |
Description Of Changes
Set up tests and instructions to run against various real world TLDs and validate that our cookie logic is sound. Can only be run locally and manually, but handy to keep around for validating any future changes.