File tree Expand file tree Collapse file tree 4 files changed +45
-30
lines changed
Expand file tree Collapse file tree 4 files changed +45
-30
lines changed Original file line number Diff line number Diff line change @@ -215,35 +215,6 @@ createNextDescribe(
215215 )
216216 } )
217217
218- it ( 'should load css while navigation between not-found and page' , async ( ) => {
219- const browser = await next . browser ( '/navigate' )
220- await check (
221- async ( ) =>
222- await browser . eval (
223- `window.getComputedStyle(document.querySelector('#nav-button')).backgroundColor`
224- ) ,
225- 'rgb(0, 128, 0)'
226- )
227- await browser . elementByCss ( '#nav-button' ) . click ( )
228- await browser . waitForElementByCss ( '#back' )
229- await check (
230- async ( ) =>
231- await browser . eval (
232- `window.getComputedStyle(document.querySelector('#back')).backgroundColor`
233- ) ,
234- 'rgb(0, 128, 0)'
235- )
236- await browser . elementByCss ( '#back' ) . click ( )
237- await browser . waitForElementByCss ( '#nav-button' )
238- await check (
239- async ( ) =>
240- await browser . eval (
241- `window.getComputedStyle(document.querySelector('#nav-button')).backgroundColor`
242- ) ,
243- 'rgb(0, 128, 0)'
244- )
245- } )
246-
247218 it ( 'should include css imported in server not-found.js' , async ( ) => {
248219 const browser = await next . browser ( '/not-found/servercomponent' )
249220 await check (
Original file line number Diff line number Diff line change @@ -9,6 +9,7 @@ function NotFound() {
99 < div >
1010 < h1 > 404 - Page Not Found</ h1 >
1111 < Button
12+ id = "go-to-index"
1213 onClick = { ( ) => {
1314 router . push ( '/' )
1415 } }
Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ export default function Page() {
88 return (
99 < >
1010 < Button
11- id = "nav-button "
11+ id = "go-to-404 "
1212 onClick = { ( ) => {
1313 router . push ( '/404' )
1414 } }
Original file line number Diff line number Diff line change 1+ import { createNextDescribe } from 'e2e-utils'
2+ import { check } from 'next-test-utils'
3+
4+ createNextDescribe (
5+ 'app dir css' ,
6+ {
7+ files : __dirname ,
8+ skipDeployment : true ,
9+ dependencies : {
10+ sass : 'latest' ,
11+ } ,
12+ } ,
13+ ( { next } ) => {
14+ it ( 'should load css while navigation between not-found and page' , async ( ) => {
15+ const browser = await next . browser ( '/' )
16+ await check (
17+ async ( ) =>
18+ await browser . eval (
19+ `window.getComputedStyle(document.querySelector('#go-to-404')).backgroundColor`
20+ ) ,
21+ 'rgb(0, 128, 0)'
22+ )
23+ await browser . elementByCss ( '#go-to-404' ) . click ( )
24+ await browser . waitForElementByCss ( '#go-to-index' )
25+ await check (
26+ async ( ) =>
27+ await browser . eval (
28+ `window.getComputedStyle(document.querySelector('#go-to-index')).backgroundColor`
29+ ) ,
30+ 'rgb(0, 128, 0)'
31+ )
32+ await browser . elementByCss ( '#go-to-index' ) . click ( )
33+ await browser . waitForElementByCss ( '#go-to-404' )
34+ await check (
35+ async ( ) =>
36+ await browser . eval (
37+ `window.getComputedStyle(document.querySelector('#go-to-404')).backgroundColor`
38+ ) ,
39+ 'rgb(0, 128, 0)'
40+ )
41+ } )
42+ }
43+ )
You can’t perform that action at this time.
0 commit comments