next.js/test/e2e/app-dir/initial-css-order/initial-css-order.test.ts
initial-css-order.test.ts28 lines725 B
import { nextTestSetup } from 'e2e-utils'

describe('initial-css-order', () => {
  const { next } = nextTestSetup({
    files: __dirname,
  })

  it('should serve styles in the correct order for the page', async () => {
    const browser = await next.browser('/')

    expect(
      await browser.eval(
        `window.getComputedStyle(document.querySelector('body')).backgroundColor`
      )
    ).toBe('rgb(0, 128, 0)')
  })

  it('should serve styles in the correct order for global-not-found', async () => {
    const browser = await next.browser('/404')

    expect(
      await browser.eval(
        `window.getComputedStyle(document.querySelector('body')).backgroundColor`
      )
    ).toBe('rgb(255, 0, 0)')
  })
})
Quest for Codev2.0.0
/
SIGN IN