Repository: vercel/next.js
File: test/e2e/app-dir/navigation/navigation.test.ts (TypeScript)

Code before:
      expect(
        await browser.waitForElementByCss('#not-found-component').text()
      ).toBe('Not Found!')
      expect(
        await browser
          .waitForElementByCss('meta[name="robots"]')
          .getAttribute('content')
      ).toBe('noindex')
    })
  })

  describe('redirect', () => {
    describe('components', () => {
      it('should redirect in a server component', async () => {
        const browser = await next.browser('/redirect/servercomponent')
        await browser.waitForElementByCss('#result-page')
        expect(await browser.elementByCss('#result-page').text()).toBe(
          'Result Page'
        )
      })

      it('should redirect in a client component', async () => {
        const browser = await next.browser('/redirect/clientcomponent')
        await browser.waitForElementByCss('#result-page')
        expect(await browser.elementByCss('#result-page').text()).toBe(
          'Result Page'
        )
      })

      it('should redirect client-side', async () => {
        const browser = await next.browser('/redirect/client-side')
        await browser
          .elementByCss('button')
          .click()
          .waitForElementByCss('#result-page')
        // eslint-disable-next-line jest/no-standalone-expect
        expect(await browser.elementByCss('#result-page').text()).toBe(
          'Result Page'
        )
      })

      it('should redirect to external url', async () => {
        const browser = await next.browser('/redirect/external')
        expect(await browser.waitForElementByCss('h1').text()).toBe(
          'Example Domain'
        )
      })

      it('should redirect to external url, initiating only once', async () => {
        const storageKey = Math.random()
        const browser = await next.browser(

Review comment (suggestion):
Moved to `test/e2e/app-dir/not-found/basic/index.test.ts`

Code after:
      expect(
        await browser.waitForElementByCss('#not-found-component').text()
      ).toBe('Not Found!')
      expect(
        await browser
          .waitForElementByCss('meta[name="robots"]')
          .getAttribute('content')
      ).toBe('noindex')
    })
  })

  describe('redirect', () => {
    describe('components', () => {
      it('should redirect in a server component', async () => {
        const browser = await next.browser('/redirect/servercomponent')
        await browser.waitForElementByCss('#result-page')
        expect(await browser.elementByCss('#result-page').text()).toBe(
          'Result Page'
        )
      })

      it('should redirect in a client component', async () => {
        const browser = await next.browser('/redirect/clientcomponent')
        await browser.waitForElementByCss('#result-page')
        expect(await browser.elementByCss('#result-page').text()).toBe(
          'Result Page'
        )
      })

      it('should redirect client-side', async () => {
        const browser = await next.browser('/redirect/client-side')
        await browser
          .elementByCss('button')
          .click()
          .waitForElementByCss('#result-page')
        expect(await browser.elementByCss('#result-page').text()).toBe(
          'Result Page'
        )
      })

      it('should redirect to external url', async () => {
        const browser = await next.browser('/redirect/external')
        expect(await browser.waitForElementByCss('h1').text()).toBe(
          'Example Domain'
        )
      })

      it('should redirect to external url, initiating only once', async () => {
        const storageKey = Math.random()
        const browser = await next.browser(
          `/redirect/external-log/${storageKey}`