Closed laylark closed 2 years ago
@laylark I think this looks great! Thanks for the tests! I am curious - did you build for production before you ran the tests or were you running them against the dev environment? I'm realizing I don't force a production build with the cypress script currently. If you were running the tests against the dev server I suspect that was the reason for the slow load times. Good catch. Either way I'll update that or add another script to run yarn build && yarn start && cypress run
. Also curious if you were running it with the cypress UI or in headless mode? (There's scripts for both in the package.json if you didn't see them)
Please check if the PR fulfills these requirements
[x] The commit message follows our guidelines
[x] Tests for the changes have been added (for bug fixes / features)
[ ] Docs have been added / updated (for bug fixes / features)
What kind of change does this PR introduce? (Bug fix, feature, docs update, ...) Additional Cypress tests for blog pages.
What is the current behavior? (You can also link to an open issue here) A portion of #85.
What is the new behavior (if this is a feature change)? N/A.
Does this PR introduce a breaking change? (What changes might users need to make in their application due to this PR?) No.
Other information: In order for Cypress to follow the blog links, I needed to wait for a pretty large period of time. Otherwise, the remainder of the test after the link clicked would not follow through to the next page. I am curious if this is related to how Next.js handles some of the routing. If you have any thoughts or advice on how to improve this, let me know!