mirror of
https://github.com/vercel/next.js.git
synced 2026-09-20 02:25:18 +08:00
32 lines
843 B
TypeScript
32 lines
843 B
TypeScript
import { nextTestSetup } from 'e2e-utils'
|
|
import { getDevIndicatorPosition } from './utils'
|
|
|
|
describe('devtools-position-persistence', () => {
|
|
const { next } = nextTestSetup({
|
|
files: __dirname,
|
|
nextConfig: {
|
|
devIndicators: {
|
|
position: 'top-right',
|
|
},
|
|
},
|
|
})
|
|
|
|
it('should maintain devtools indicator position after navigation', async () => {
|
|
const browser = await next.browser('/')
|
|
|
|
let style = await getDevIndicatorPosition(browser)
|
|
|
|
expect(style).toContain('top: 20px')
|
|
expect(style).toContain('right: 20px')
|
|
|
|
// Navigate and check devtools indicator position is maintained
|
|
await browser.refresh()
|
|
await browser.waitForIdleNetwork()
|
|
|
|
style = await getDevIndicatorPosition(browser)
|
|
|
|
expect(style).toContain('top: 20px')
|
|
expect(style).toContain('right: 20px')
|
|
})
|
|
})
|