Static Siblings Test

About

This test verifies that when a dynamic route has static siblings at the same URL level, the client can correctly navigate to the static sibling even after the dynamic route has been visited/prefetched.

Manual testing instructions

  1. Click the checkbox next to a dynamic route to reveal it
  2. Click the revealed link to navigate to the dynamic route
  3. Use the browser back button to return to this page
  4. Click the static sibling link (which has prefetch=false)
  5. Verify the static sibling page renders, not the dynamic route

The key behavior being tested: when navigating to a URL that matches both a dynamic route (e.g., /products/[id]) and a static route (e.g., /products/sale), the static route should take precedence. The route tree delivered by the server includes information about static siblings to facilitate this behavior.


Cross-Route-Group Siblings

/products/sale vs /products/[id] (in different route groups)

Dynamic route: /products/123 (link is hidden)
Static sibling: /products/sale

Same-Directory Siblings

/items/featured vs /items/[id] (in the same directory)

Dynamic route: /items/456 (link is hidden)
Static sibling: /items/featured

Parallel Route Siblings

/dashboard/settings vs /dashboard/[id] (in @panel parallel route)

Dynamic route: /dashboard/789 (link is hidden)
Static sibling: /dashboard/settings

Deeply Nested Static Siblings

/categories/electronics/computers/laptops vs /categories/[slug] (static sibling with multiple layouts along its path)

Dynamic route: /categories/phones (link is hidden)
Static sibling: /categories/electronics/computers/laptops