()
| 16 | const appDir = join(__dirname, '../') |
| 17 | |
| 18 | function runTests() { |
| 19 | it('should cancel slow page loads on re-navigation', async () => { |
| 20 | const browser = await webdriver(appPort, '/') |
| 21 | |
| 22 | await browser.elementByCss('#link-1').click() |
| 23 | await waitFor(3000) |
| 24 | expect(await browser.hasElementByCssSelector('#page-text')).toBeFalsy() |
| 25 | |
| 26 | await browser.elementByCss('#link-2').click() |
| 27 | await waitFor(3000) |
| 28 | |
| 29 | const text2 = await browser.elementByCss('#page-text').text() |
| 30 | expect(text2).toMatch(/2/) |
| 31 | expect(await browser.eval('window.routeCancelled')).toBe('yes') |
| 32 | }) |
| 33 | } |
| 34 | |
| 35 | describe('route cancel via CSS', () => { |
| 36 | ;(process.env.TURBOPACK_DEV ? describe.skip : describe)( |
no test coverage detected