next-runtime icon indicating copy to clipboard operation
next-runtime copied to clipboard

chore: Add extensive test cases (e2e)

Open tiffafoo opened this issue 2 years ago • 5 comments

Parent issue to keep track of all test cases/sites we want to have covered via Cypress. We will want to test most features of Next to ensure we don't break anything. Feel free to add more test cases.

Default site

This is the main demo site that represents simple use cases of various features of Next

  • [x] basePath
  • [x] Preview mode
  • [x] i18n
  • [x] Headers
  • [x] Rewrites/redirects
  • [x] basePath + i18n
  • [x] Trailing slash
  • [x] Catch-all/optional catch-all, getxxprops
  • [x] Images
  • [x] Dynamic imports
  • [x] Custom 404/500
  • [x] Static assets in public
  • [x] cookie header locale
  • [ ] middleware (and on edge runtime https://github.com/netlify/netlify-plugin-nextjs/pull/1382)
  • [ ] advanced rewrite rules
  • [ ] react server components

Monorepo site

This represents a monorepo with sites deployed from it and some more advanced configuration

  • [ ] Custom dist
  • [ ] Monorepo: next run in root with site root in subdirectory

Nx site

This represents a site using Nx (monorepo)

  • [x] nx create-app

tiffafoo avatar Nov 24 '21 12:11 tiffafoo

@tiffanosaurus, I'm going to go ahead and remove you from this as you've switched teams. Whoever picks this up, there's still some E2E tests to complete.

nickytonline avatar May 05 '22 14:05 nickytonline

Hi @netlify/frameworks! We've been working on the Next.js plugin quite a bit lately. Just wondering if any of that work involved E2E tests for the middleware and advanced rewrite rules?

nickytonline avatar May 09 '22 21:05 nickytonline

Hey @nickytonline, no afaik we haven't added tests yet for those features. I'm hoping to chat to Erica later this week about a few testing things so I'll roll this into it.

orinokai avatar May 11 '22 09:05 orinokai

@orinokai - Where are we at with this work? I was wondering if it's worth splitting this up into more manageable tickets if there's lots left to do.

MarcL avatar Jun 27 '22 10:06 MarcL

I had planned to give the tests a good review after I finished the fallback work because the tests would need to be updated, but both aspects of that work are currently blocked and they should probably be a separate issue once the work is complete away. I'll make a start on this ticket this week.

orinokai avatar Jul 05 '22 13:07 orinokai

We've now got a solid test suite for the v5 runtime so closing this as we don't plan to do the same for v4.

MarcL avatar Apr 18 '24 10:04 MarcL