next.js/test/e2e/app-dir/not-found-with-nested-layouts/index.test.ts
index.test.ts21 lines605 B
import { nextTestSetup } from 'e2e-utils'
import { waitForNoRedbox } from 'next-test-utils'

describe('app dir - not found with nested layouts', () => {
  const { next, skipped } = nextTestSetup({
    files: __dirname,
    skipDeployment: true,
  })

  if (skipped) {
    return
  }

  it('should render the custom not-found page when notFound() is thrown from a page', async () => {
    const browser = await next.browser('/')
    await waitForNoRedbox(browser)
    const heading = await browser.elementByCss('h1#not-found-heading')
    expect(await heading.text()).toBe('Custom Not Found Page')
  })
})
Quest for Codev2.0.0
/
SIGN IN