()
| 15 | const appDir = join(__dirname, '../') |
| 16 | |
| 17 | function runTests() { |
| 18 | it('should load a Pages Router page correctly', async () => { |
| 19 | const browser = await webdriver(appPort, '/') |
| 20 | |
| 21 | expect( |
| 22 | await browser |
| 23 | .elementByCss('#__next div:nth-child(2)') |
| 24 | .getComputedCss('background-color') |
| 25 | ).toContain('221, 221, 221') |
| 26 | |
| 27 | expect(await browser.eval('document.documentElement.innerHTML')).toContain( |
| 28 | 'Where does it come from?' |
| 29 | ) |
| 30 | }) |
| 31 | |
| 32 | it('should load a App Router page correctly', async () => { |
| 33 | const browser = await webdriver(appPort, '/test-app') |
| 34 | |
| 35 | expect( |
| 36 | await browser |
| 37 | .elementByCss('body div:nth-child(3)') |
| 38 | .getComputedCss('background-color') |
| 39 | ).toContain('221, 221, 221') |
| 40 | |
| 41 | expect(await browser.eval('document.documentElement.innerHTML')).toContain( |
| 42 | 'Where does it come from?' |
| 43 | ) |
| 44 | }) |
| 45 | } |
| 46 | |
| 47 | describe('next/dynamic', () => { |
| 48 | ;(process.env.TURBOPACK_BUILD ? describe.skip : describe)( |
no test coverage detected