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

test: Replace react-scripts example by nextjs example #867

Merged
merged 5 commits into from
Apr 18, 2023

Conversation

MikeMcC399
Copy link
Collaborator

This PR resolves #866 "Deprecations related to examples/react-scripts".

It implements the suggestion to replace examples/react-scripts by a new example based on Start a New React Project using Next.js.

The setup follows Create a Next.js App.

Changes

  1. examples/react-scripts is removed.
  2. In its place examples/nextjs is added.
  3. The workflow .github/workflows/example-wait-on.yml is modified to use examples/nextjs instead of examples/react-scripts.
  4. The scripts/update-cypress-latest-npm.sh is modified to update examples/nextjs to cypress@latest instead of examples/react-scripts.

Verification

Local

Execute:

npm ci
npm outdated
npm audit
npm run update:cypress

and ensure

  1. no errors are reported
  2. no out-of-date dependencies are reported
  3. 0 vulnerabilities are reported

GitHub

Examine workflow log from https://github.com/cypress-io/github-action/actions/workflows/example-wait-on.yml and ensure that the jobs:

  • wait-on-nextjs
  • wait-using-custom-command

complete successfully.

wait-on is using localhost showing that the workaround of 127.0.0.1 needed for the react-scripts example is not necessary for nextjs

@MikeMcC399 MikeMcC399 marked this pull request as ready for review April 14, 2023 16:14
@MikeMcC399 MikeMcC399 marked this pull request as draft April 18, 2023 15:25
@MikeMcC399 MikeMcC399 marked this pull request as ready for review April 18, 2023 15:40
@MikeMcC399

This comment was marked as outdated.

Copy link

@jordanpowell88 jordanpowell88 left a comment

Choose a reason for hiding this comment

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

LGTM. Great job @MikeMcC399

Copy link
Contributor

@jaffrepaul jaffrepaul left a comment

Choose a reason for hiding this comment

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

Good stuff. Thanks Mike!

@jaffrepaul jaffrepaul merged commit 350e074 into cypress-io:master Apr 18, 2023
@MikeMcC399
Copy link
Collaborator Author

@jordanpowell88 / @jaffrepaul

Thanks guys! The difficult part is mostly figuring out what the right solution should be. Implementing it is often relatively straightforward.

@MikeMcC399 MikeMcC399 deleted the add/nextjs branch April 19, 2023 05:03
@github-actions
Copy link

github-actions bot commented May 1, 2023

🎉 This PR is included in version 5.6.2 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Deprecations related to examples/react-scripts
3 participants