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

Create cypress tests for blog spec #126

Merged
merged 1 commit into from
Oct 25, 2022

Conversation

laylark
Copy link
Contributor

@laylark laylark commented Oct 24, 2022

  • Please check if the PR fulfills these requirements
  • The commit message follows our guidelines
  • 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 Review test coverage and augment / strategize as needed. #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!

@zenlex
Copy link
Collaborator

zenlex commented Oct 25, 2022

@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)

Copy link
Collaborator

@zenlex zenlex left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work!

@zenlex zenlex merged commit 4d634e4 into codefortulsa:dev Oct 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants