File size: 1,116 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 33 34 35 36 37 38 39 40 |
import { nextTestSetup } from 'e2e-utils'
describe('children-page', () => {
const { next } = nextTestSetup({
files: __dirname,
})
describe('with app dir', () => {
it('should show the content if you have a page named children', async () => {
const browser = await next.browser('/children')
const text = await browser.waitForElementByCss('#children-page').text()
expect(text).toBe('children - app')
const currentDisplay = await browser.eval(
`window.getComputedStyle(document.querySelector('body')).display`
)
expect(currentDisplay).toBe('block')
})
})
describe('with pages dir', () => {
it('should show the content if you have a page named children', async () => {
const browser = await next.browser('/other/children')
const text = await browser.waitForElementByCss('#children-page').text()
expect(text).toBe('children - pages')
const currentDisplay = await browser.eval(
`window.getComputedStyle(document.querySelector('body')).display`
)
expect(currentDisplay).toBe('block')
})
})
})
|