File size: 796 Bytes
1e92f2d
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
import { nextTestSetup } from 'e2e-utils'

// TODO-APP: fix test as it's failing randomly
describe.skip('app-dir back button download bug', () => {
  describe('app-dir back button download bug', () => {
    const { next, skipped } = nextTestSetup({
      files: __dirname,
      skipDeployment: true,
    })

    if (skipped) {
      return
    }

    it('should redirect route when clicking link', async () => {
      const browser = await next.browser('/')
      const text = await browser
        .elementByCss('#to-post-1')
        .click()
        .waitForElementByCss('#post-page')
        .text()
      expect(text).toBe('This is the post page')

      await browser.back()

      expect(await browser.waitForElementByCss('#home-page').text()).toBe(
        'Home!'
      )
    })
  })
})