rsnext/test/e2e/app-dir
Jimmy Lai 1cf1198cab
interception routes: re-implementation (#48027)
The first implementation had limitation wrt to static routes so this is
a "simpler" approach to making interception work. This also fixes a few
bugs.

In this PR:
- changed the computation of the referrer route to now live on the
client state, since it's the only place where you can accurately keep
track of that. One router state was not sufficient, we needed a delta of
two states to guess which route had changed when having parallel routes
in the tree.
- uses rewrites as the basis for interception now instead of route
handlers, this means that we have to do some sketchy logic to make the
rules work since they only handle regexes whereas we have
`path/like/[this]`
- dev server now reloads rewrites as well when needed

<!-- Thanks for opening a PR! Your contribution is much appreciated.
To make sure your PR is handled as smoothly as possible we request that
you follow the checklist sections below.
Choose the right checklist for the change(s) that you're making:

## For Contributors

### Improving Documentation or adding/fixing Examples

- The "examples guidelines" are followed from our contributing doc
https://github.com/vercel/next.js/blob/canary/contributing/examples/adding-examples.md
- Make sure the linting passes by running `pnpm build && pnpm lint`. See
https://github.com/vercel/next.js/blob/canary/contributing/repository/linting.md

### Fixing a bug

- Related issues linked using `fixes #number`
- Tests added. See:
https://github.com/vercel/next.js/blob/canary/contributing/core/testing.md#writing-tests-for-nextjs
- Errors have a helpful link attached, see
https://github.com/vercel/next.js/blob/canary/contributing.md

### Adding a feature

- Implements an existing feature request or RFC. Make sure the feature
request has been accepted for implementation before opening a PR. (A
discussion must be opened, see
https://github.com/vercel/next.js/discussions/new?category=ideas)
- Related issues/discussions are linked using `fixes #number`
- e2e tests added
(https://github.com/vercel/next.js/blob/canary/contributing/core/testing.md#writing-tests-for-nextjs
- Documentation added
- Telemetry added. In case of a feature if it's used or not.
- Errors have a helpful link attached, see
https://github.com/vercel/next.js/blob/canary/contributing.md



## For Maintainers

- Minimal description (aim for explaining to someone not on the team to
understand the PR)
- When linking to a Slack thread, you might want to share details of the
conclusion
- Link both the Linear (Fixes NEXT-xxx) and the GitHub issues
- Add review comments if necessary to explain to the reviewer the logic
behind a change

### What?

### Why?

### How?

Closes NEXT-
Fixes #

-->
2023-04-06 15:59:45 +00:00
..
_allow-underscored-root-directory Underscore Handling Fixes (#47581) 2023-03-28 12:19:01 +02:00
actions Finalize HOC support with server entries and add encodeReply & decodeReply (#47438) 2023-03-24 13:01:10 +01:00
app Update search params/route params handling on deploy (#47930) 2023-04-05 14:14:40 -07:00
app-a11y Implement route announcer for app dir (#47018) 2023-03-13 13:09:22 -07:00
app-alias Add experimental route type checking (#45761) 2023-02-11 15:06:39 +00:00
app-basepath Fix flaky css test and remove unused tests deps (#47806) 2023-04-01 16:58:32 -07:00
app-css Fix css applying for root not found (#47992) 2023-04-06 13:37:55 +02:00
app-edge Pass through original matcher source in manifest (#46753) 2023-03-03 16:55:41 -08:00
app-edge-global Move tests into their test folder (#44183) 2022-12-21 14:16:52 +01:00
app-external Fix flaky css test and remove unused tests deps (#47806) 2023-04-01 16:58:32 -07:00
app-middleware Update client router filter to separate redirects handling (#46752) 2023-03-03 16:02:02 -08:00
app-prefetch Fix prefetch only being applied once (#47797) 2023-04-01 23:12:49 -07:00
app-rendering Update some flakey test cases (#47556) 2023-03-26 23:41:15 -07:00
app-routes Add dynamic parameter marker to router cache key (#47957) 2023-04-05 15:40:28 +02:00
app-routes-trailing-slash Unify Request types (#47884) 2023-04-05 18:24:08 +00:00
app-static Fix fetchCache config and On-Demand Revalidate handling (#47803) 2023-04-01 21:15:13 -07:00
app-validation Add Zod and router state validation (#46962) 2023-03-10 13:37:45 +00:00
asset-prefix Change NextInstance.fetch Signature (#44575) 2023-01-05 16:31:03 +01:00
async-component-preload Move tests into their test folder (#44183) 2022-12-21 14:16:52 +01:00
autoscroll-with-css-modules Fix issue where layout-router wouldn't auto-scroll if we imported styles or fonts (#45487) 2023-02-07 12:03:18 +00:00
back-button-download-bug Move tests into their test folder (#44183) 2022-12-21 14:16:52 +01:00
create-next-app-template Migrate create-next-app and e2e tests to Metadata API. (#45819) 2023-02-23 23:40:06 +00:00
create-root-layout Migrate create-next-app and e2e tests to Metadata API. (#45819) 2023-02-23 23:40:06 +00:00
dynamic Separate next/dynamic implementation for app and pages (#45565) 2023-02-04 01:45:35 +00:00
dynamic-href Move tests into their test folder (#44183) 2022-12-21 14:16:52 +01:00
edge-runtime-node-compatibility [edge] limit the api surface of util (#47292) 2023-03-20 10:29:00 +01:00
experimental-react Vendor react@experimental under an experimentalReact flag (#47759) 2023-04-05 14:05:47 +00:00
global-error Update test env variable passing (#44912) 2023-01-15 23:20:16 -08:00
hooks Fix flaky css test and remove unused tests deps (#47806) 2023-04-01 16:58:32 -07:00
i18n-hybrid Update failing i18n e2e deploy test (#47555) 2023-03-26 22:40:32 -07:00
import Move tests into their test folder (#44183) 2022-12-21 14:16:52 +01:00
interpolability-with-pages Update test env for E2E deploy mode (#44937) 2023-01-16 15:39:54 -08:00
layout-params Move tests into their test folder (#44183) 2022-12-21 14:16:52 +01:00
mdx Add additional tests for @next/mdx (#45585)Co-authored-by: Shu Ding <g@shud.in> 2023-02-11 13:37:00 +01:00
metadata Fix metadata nested twitter props rendering (#47972) 2023-04-05 22:15:10 +00:00
metadata-dynamic-routes Create unique route path for og under group routes (#47985) 2023-04-05 22:40:17 +00:00
metadata-missing-metadata-base Fallback to localhost for metadataBase when it's used and missing (#47910) 2023-04-05 15:39:29 +00:00
metadata-suspense Add not found boundary and move head cache to app router (#47688) 2023-03-30 14:08:37 -07:00
navigation Hide not ENOENT errors for not found in ipc server (#47854) 2023-04-04 11:46:49 -07:00
next-font Remove experimental fontLoaders option from next.config.js (#46886) 2023-03-13 21:34:43 +00:00
next-image Move tests into their test folder (#44183) 2022-12-21 14:16:52 +01:00
not-found Add not found boundary and move head cache to app router (#47688) 2023-03-30 14:08:37 -07:00
pages-to-app-routing Add client router filter handling (#46283) 2023-02-22 22:02:31 -08:00
parallel-routes-and-interception interception routes: re-implementation (#48027) 2023-04-06 15:59:45 +00:00
rewrites-redirects Update test env for E2E deploy mode (#44937) 2023-01-16 15:39:54 -08:00
root-layout Update flakey app dev tests (#47504) 2023-03-24 15:44:44 -07:00
root-layout-redirect Catch redirect() in root layout (#47345) 2023-03-22 09:34:50 +01:00
route-page-manifest-bug Fix manifest error when using route.js (#46102) 2023-02-18 20:31:49 +01:00
router-autoscroll Fix issue where layout-router wouldn't auto-scroll if we imported styles or fonts (#45487) 2023-02-07 12:03:18 +00:00
router-stuck-dynamic-static-segment Add dynamic parameter marker to router cache key (#47957) 2023-04-05 15:40:28 +02:00
rsc-basic Update render IPC handling (#47835) 2023-04-02 21:56:46 -07:00
searchparams-static-bailout Opt-in to dynamic rendering when reading searchParams (#46205) 2023-03-16 21:46:35 +01:00
set-cookies Update set-cookies deploy test (#47836) 2023-04-02 22:18:40 -07:00
similar-pages-paths Fix conflict dev entry key between app and pages (#46832) 2023-03-07 12:27:10 -08:00
test-template/{{ toFileName name }} Add additional tests for @next/mdx (#45585)Co-authored-by: Shu Ding <g@shud.in> 2023-02-11 13:37:00 +01:00
trailingslash Change NextInstance.fetch Signature (#44575) 2023-01-05 16:31:03 +01:00
underscore-ignore-app-paths Ignore folders prefixed by underscore (_) in App Router (#47439) 2023-03-24 12:53:11 +01:00
use-params Check for null before reading value in useParams (#47875) 2023-04-05 21:51:52 +00:00
use-selected-layout-segment-s Fix useSelectedLayoutSegments including __PAGE__ (#47492) 2023-03-24 16:13:22 +01:00
with-babel Move tests into their test folder (#44183) 2022-12-21 14:16:52 +01:00