nextjs-blog-theme
nextjs-blog-theme copied to clipboard
installed netlify cli and using it for testing
Deploy Preview for bejamas-nextjs-blog ready!
| Name | Link |
|---|---|
| Latest commit | 5817cc92c5fcf4b2122efa42cd1bb46d72015b3f |
| Latest deploy log | https://app.netlify.com/sites/bejamas-nextjs-blog/deploys/63b43b77c89ee200089eab45 |
| Deploy Preview | https://deploy-preview-112--bejamas-nextjs-blog.netlify.app |
| Preview on mobile | Toggle QR Code...Use your smartphone camera to open QR code link. |
To edit notification comments on pull requests, go to your Netlify site settings.
Before merging this I'd like us to get the test to fail so that we can prove the Cypress tests work as expected.
If you install @netlify/plugin-nextjs, add the plugin to the netlify.toml again, and pin the version at 4.29.0, it'll fail to render when deployed as this version had the issue. We can confirm that using the Cypress plugin runs the test against the deployed URL and fails.
Once we're happy it fails correctly, we can remove the plugin's manual installation and it should automatically pick up the latest version and pass.
I've had a quick dig into this @taty2010 and I have got the Cypress plugin to run the tests after deployment. However, the Netlify GitHub app tells us that it's fine to merge as the tests are run after the deploy step.
To get this to work and test the deployed site, I think we'll have to look at using GitHub actions to do it. There's some similar code for the Next.js runtime which we can use as guidance.
Here's my example GitHub workflow which should be able to run the Cypress tests against the live deploy.
https://github.com/MarcL/nextjs-blog-theme/pull/2
It'll need the Netlify action to wait for the deploy to finish to get the deploy preview.
https://github.com/netlify/wait-for-deploy-action
We'll need to ask for the secrets to be added to this repository (see the instructions in the above repo).