File tree Expand file tree Collapse file tree 5 files changed +24
-3
lines changed
dev-packages/e2e-tests/test-applications/nextjs-15 Expand file tree Collapse file tree 5 files changed +24
-3
lines changed Original file line number Diff line number Diff line change @@ -44,3 +44,5 @@ next-env.d.ts
44
44
45
45
test-results
46
46
event-dumps
47
+
48
+ .tmp_dev_server_logs
Original file line number Diff line number Diff line change
1
+ export default function Page ( ) {
2
+ return < p > Next 15 test app</ p > ;
3
+ }
Original file line number Diff line number Diff line change 4
4
"private" : true ,
5
5
"scripts" : {
6
6
"build" : " next build > .tmp_build_stdout 2> .tmp_build_stderr || (cat .tmp_build_stdout && cat .tmp_build_stderr && exit 1)" ,
7
- "clean" : " npx rimraf node_modules pnpm-lock.yaml" ,
7
+ "clean" : " npx rimraf node_modules pnpm-lock.yaml .tmp_dev_server_logs " ,
8
8
"test:prod" : " TEST_ENV=production playwright test" ,
9
9
"test:dev" : " TEST_ENV=development playwright test" ,
10
10
"test:dev-turbo" : " TEST_ENV=dev-turbopack playwright test" ,
Original file line number Diff line number Diff line change @@ -7,11 +7,11 @@ if (!testEnv) {
7
7
8
8
const getStartCommand = ( ) => {
9
9
if ( testEnv === 'dev-turbopack' ) {
10
- return 'pnpm next dev -p 3030 --turbopack' ;
10
+ return 'pnpm next dev -p 3030 --turbopack 2>&1 | tee .tmp_dev_server_logs ' ;
11
11
}
12
12
13
13
if ( testEnv === 'development' ) {
14
- return 'pnpm next dev -p 3030' ;
14
+ return 'pnpm next dev -p 3030 2>&1 | tee .tmp_dev_server_logs ' ;
15
15
}
16
16
17
17
if ( testEnv === 'production' ) {
Original file line number Diff line number Diff line change
1
+ import { expect , test } from '@playwright/test' ;
2
+ import fs from 'fs' ;
3
+
4
+ test . only ( 'should not print warning for async params' , async ( { page } ) => {
5
+ test . skip (
6
+ process . env . TEST_ENV !== 'development' && process . env . TEST_ENV !== 'dev-turbopack' ,
7
+ 'should be skipped for non-dev mode' ,
8
+ ) ;
9
+ await page . goto ( '/' ) ;
10
+
11
+ // If the server exits with code 1, the test will fail (see instrumentation.ts)
12
+ const devStdout = fs . readFileSync ( '.tmp_dev_server_logs' , 'utf-8' ) ;
13
+ expect ( devStdout ) . not . toContain ( '`params` should be awaited before using its properties.' ) ;
14
+
15
+ await expect ( page . getByText ( 'Next 15 test app' ) ) . toBeVisible ( ) ;
16
+ } ) ;
You can’t perform that action at this time.
0 commit comments