mirror of
https://github.com/hanzoai/next.js.git
synced 2026-09-24 17:00:51 +00:00
Format line format: `<segment> [<files,>]` This will help visualize the rendered segment explorer panel easier by checking the snapshot. e.g. ``` app/ [layout.tsx] parallel-routes/ [layout.tsx, page.tsx] @bar/ [layout.tsx, page.tsx] @foo/ [layout.tsx, page.tsx] ```
23 lines
711 B
TypeScript
23 lines
711 B
TypeScript
import { nextTestSetup } from 'e2e-utils'
|
|
import { getSegmentExplorerContent } from 'next-test-utils'
|
|
|
|
describe('segment-explorer - globals', () => {
|
|
const { next } = nextTestSetup({
|
|
files: __dirname,
|
|
})
|
|
|
|
it('should show global-error segment', async () => {
|
|
const browser = await next.browser('/runtime-error')
|
|
expect(await getSegmentExplorerContent(browser)).toMatchInlineSnapshot(
|
|
`"app/ [global-error.tsx]"`
|
|
)
|
|
})
|
|
|
|
it('should display parallel routes default page when present', async () => {
|
|
const browser = await next.browser('/404-not-found')
|
|
expect(await getSegmentExplorerContent(browser)).toMatchInlineSnapshot(
|
|
`"app/ [global-not-found.tsx]"`
|
|
)
|
|
})
|
|
})
|