Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
N
next.js
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Alex
next.js
Commits
b3278b75
Unverified
Commit
b3278b75
authored
Jul 07, 2026
by
Niklas Mischkulnig
Committed by
GitHub
Jul 07, 2026
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
test: Use Turbopack for 'Test new and changed tests when deployed' (#95552)
parent
8cc2bd1e
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
35 additions
and
17 deletions
+35
-17
build_and_test.yml
.github/workflows/build_and_test.yml
+2
-0
test-new-tests.mjs
scripts/test-new-tests.mjs
+9
-1
app-action-form-state.test.ts
test/e2e/app-dir/actions/app-action-form-state.test.ts
+24
-16
No files found.
.github/workflows/build_and_test.yml
View file @
b3278b75
...
@@ -754,6 +754,7 @@ jobs:
...
@@ -754,6 +754,7 @@ jobs:
export NEXT_E2E_TEST_TIMEOUT=240000
export NEXT_E2E_TEST_TIMEOUT=240000
export __NEXT_EXPERIMENTAL_STRICT_ROUTE_TYPES=true
export __NEXT_EXPERIMENTAL_STRICT_ROUTE_TYPES=true
export __NEXT_EXPERIMENTAL_APP_NEW_SCROLL_HANDLER=false
export __NEXT_EXPERIMENTAL_APP_NEW_SCROLL_HANDLER=false
export IS_TURBOPACK_TEST=1
node scripts/test-new-tests.mjs \
node scripts/test-new-tests.mjs \
--mode deploy \
--mode deploy \
--group ${{ matrix.group }} \
--group ${{ matrix.group }} \
...
@@ -788,6 +789,7 @@ jobs:
...
@@ -788,6 +789,7 @@ jobs:
export NEXT_ENABLE_ADAPTER=1
export NEXT_ENABLE_ADAPTER=1
export NEXT_EXTERNAL_TESTS_FILTERS="test/deploy-tests-manifest.json,test/cache-components-tests-manifest.json"
export NEXT_EXTERNAL_TESTS_FILTERS="test/deploy-tests-manifest.json,test/cache-components-tests-manifest.json"
export NEXT_E2E_TEST_TIMEOUT=240000
export NEXT_E2E_TEST_TIMEOUT=240000
export IS_TURBOPACK_TEST=1
node scripts/test-new-tests.mjs \
node scripts/test-new-tests.mjs \
--mode deploy \
--mode deploy \
--group ${{ matrix.group }} \
--group ${{ matrix.group }} \
...
...
scripts/test-new-tests.mjs
View file @
b3278b75
...
@@ -189,7 +189,15 @@ async function main() {
...
@@ -189,7 +189,15 @@ async function main() {
NEXT_TEST_MODE
:
testMode
,
NEXT_TEST_MODE
:
testMode
,
NEXT_TEST_VERSION
:
nextTestVersion
,
NEXT_TEST_VERSION
:
nextTestVersion
,
NEXT_TEST_PREVIEW_BUILDS_BASE_URL
:
previewBuildsBaseUrl
,
NEXT_TEST_PREVIEW_BUILDS_BASE_URL
:
previewBuildsBaseUrl
,
IS_WEBPACK_TEST
:
'1'
,
TURBOPACK_BUILD
:
process
.
env
.
IS_TURBOPACK_TEST
&&
(
testMode
===
'start'
||
testMode
===
'deploy'
)
?
'1'
:
undefined
,
TURBOPACK_DEV
:
process
.
env
.
IS_TURBOPACK_TEST
&&
testMode
===
'dev'
?
'1'
:
undefined
,
NEXT_TEST_SKIP_RESULT_CACHE
:
'1'
,
NEXT_TEST_SKIP_RESULT_CACHE
:
'1'
,
},
},
})
})
...
...
test/e2e/app-dir/actions/app-action-form-state.test.ts
View file @
b3278b75
import
{
FileRef
,
nextTestSetup
}
from
'e2e-utils'
import
{
FileRef
,
nextTestSetup
}
from
'e2e-utils'
import
{
check
}
from
'next-test-utils'
import
{
retry
}
from
'next-test-utils'
import
{
join
}
from
'path'
import
{
join
}
from
'path'
describe
(
'app-dir action useActionState'
,
()
=>
{
describe
(
'app-dir action useActionState'
,
()
=>
{
...
@@ -20,9 +20,11 @@ describe('app-dir action useActionState', () => {
...
@@ -20,9 +20,11 @@ describe('app-dir action useActionState', () => {
await
browser
.
eval
(
`document.getElementById('name-input').value = 'test'`
)
await
browser
.
eval
(
`document.getElementById('name-input').value = 'test'`
)
await
browser
.
elementByCss
(
'#submit-form'
).
click
()
await
browser
.
elementByCss
(
'#submit-form'
).
click
()
await
check
(()
=>
{
await
retry
(
async
()
=>
{
return
browser
.
elementByCss
(
'#form-state'
).
text
()
expect
(
await
browser
.
elementByCss
(
'#form-state'
).
text
()).
toBe
(
},
'initial-state:test'
)
'initial-state:test'
)
})
})
})
it
(
'should support submitting form state without JS'
,
async
()
=>
{
it
(
'should support submitting form state without JS'
,
async
()
=>
{
...
@@ -34,9 +36,11 @@ describe('app-dir action useActionState', () => {
...
@@ -34,9 +36,11 @@ describe('app-dir action useActionState', () => {
await
browser
.
elementByCss
(
'#submit-form'
).
click
()
await
browser
.
elementByCss
(
'#submit-form'
).
click
()
// It should inline the form state into HTML so it can still be hydrated.
// It should inline the form state into HTML so it can still be hydrated.
await
check
(()
=>
{
await
retry
(
async
()
=>
{
return
browser
.
elementByCss
(
'#form-state'
).
text
()
expect
(
await
browser
.
elementByCss
(
'#form-state'
).
text
()).
toBe
(
},
'initial-state:test'
)
'initial-state:test'
)
})
})
})
it
(
'should support hydrating the app from progressively enhanced form request'
,
async
()
=>
{
it
(
'should support hydrating the app from progressively enhanced form request'
,
async
()
=>
{
...
@@ -46,14 +50,16 @@ describe('app-dir action useActionState', () => {
...
@@ -46,14 +50,16 @@ describe('app-dir action useActionState', () => {
await
browser
.
eval
(
`document.getElementById('name-input').value = 'test'`
)
await
browser
.
eval
(
`document.getElementById('name-input').value = 'test'`
)
await
browser
.
eval
(
`document.getElementById('form-state-form').submit()`
)
await
browser
.
eval
(
`document.getElementById('form-state-form').submit()`
)
await
check
(()
=>
{
await
retry
(
async
()
=>
{
return
browser
.
elementByCss
(
'#form-state'
).
text
()
expect
(
await
browser
.
elementByCss
(
'#form-state'
).
text
()).
toBe
(
},
'initial-state:test'
)
'initial-state:test'
)
})
// Should hydrate successfully
// Should hydrate successfully
await
check
(
()
=>
{
await
retry
(
async
()
=>
{
return
browser
.
elementByCss
(
'#hydrated'
).
text
(
)
expect
(
await
browser
.
elementByCss
(
'#hydrated'
).
text
()).
toBe
(
'hydrated'
)
}
,
'hydrated'
)
})
})
})
it
(
'should send the action to the provided permalink with form state when JS disabled'
,
async
()
=>
{
it
(
'should send the action to the provided permalink with form state when JS disabled'
,
async
()
=>
{
...
@@ -67,8 +73,10 @@ describe('app-dir action useActionState', () => {
...
@@ -67,8 +73,10 @@ describe('app-dir action useActionState', () => {
)
)
await
browser
.
eval
(
`document.getElementById('form-state-form').submit()`
)
await
browser
.
eval
(
`document.getElementById('form-state-form').submit()`
)
await
check
(()
=>
{
await
retry
(
async
()
=>
{
return
browser
.
elementByCss
(
'#form-state'
).
text
()
expect
(
await
browser
.
elementByCss
(
'#form-state'
).
text
()).
toBe
(
},
'initial-state:test-permalink'
)
'initial-state:test-permalink'
)
})
})
})
})
})
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment