67c802ac17
<!-- Thanks for opening a PR! Your contribution is much appreciated. To make sure your PR is handled as smoothly as possible we request that you follow the checklist sections below. Choose the right checklist for the change that you're making: --> ## Bug - [ ] Related issues linked using `fixes #number` - [ ] Integration tests added - [ ] Errors have a helpful link attached, see `contributing.md` ## Feature - [ ] Implements an existing feature request or RFC. Make sure the feature request has been accepted for implementation before opening a PR. - [ ] Related issues linked using `fixes #number` - [ ] Integration tests added - [ ] Documentation added - [ ] Telemetry added. In case of a feature if it's used or not. - [ ] Errors have a helpful link attached, see `contributing.md` ## Documentation / Examples - [ ] Make sure the linting passes by running `pnpm lint` - [ ] The "examples guidelines" are followed from [our contributing doc](https://github.com/vercel/next.js/blob/canary/contributing/examples/adding-examples.md)
42 lines
1.1 KiB
TypeScript
42 lines
1.1 KiB
TypeScript
import { createNext, FileRef } from 'e2e-utils'
|
|
import { NextInstance } from 'test/lib/next-modes/base'
|
|
import path from 'path'
|
|
import webdriver from 'next-webdriver'
|
|
|
|
// TODO-APP: fix test as it's failing randomly
|
|
describe.skip('app-dir back button download bug', () => {
|
|
if ((global as any).isNextDeploy) {
|
|
it('should skip next deploy for now', () => {})
|
|
return
|
|
}
|
|
|
|
let next: NextInstance
|
|
|
|
beforeAll(async () => {
|
|
next = await createNext({
|
|
files: new FileRef(path.join(__dirname, 'back-button-download-bug')),
|
|
dependencies: {
|
|
react: 'experimental',
|
|
'react-dom': 'experimental',
|
|
},
|
|
skipStart: true,
|
|
})
|
|
|
|
await next.start()
|
|
})
|
|
afterAll(() => next.destroy())
|
|
|
|
it('should redirect route when clicking link', async () => {
|
|
const browser = await webdriver(next.url, '/')
|
|
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!')
|
|
})
|
|
})
|