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
010a31cf
Unverified
Commit
010a31cf
authored
Jun 30, 2021
by
JJ Kasper
Committed by
GitHub
Jun 30, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update azure tests (#26779)
parent
551b6149
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
56 additions
and
51 deletions
+56
-51
azure-pipelines.yml
azure-pipelines.yml
+34
-33
index.test.js
test/integration/production/test/index.test.js
+22
-18
No files found.
azure-pipelines.yml
View file @
010a31cf
...
@@ -111,36 +111,37 @@ stages:
...
@@ -111,36 +111,37 @@ stages:
-
script
:
|
-
script
:
|
node run-tests.js -g 1/1 --timings --azure --type unit
node run-tests.js -g 1/1 --timings --azure --type unit
displayName
:
'
Run
tests'
displayName
:
'
Run
tests'
# TODO: investigate re-enabling when stability matches running in
-
job
:
test_chrome_integration
# tests in ubuntu environment
pool
:
# - job: test_chrome_integration
vmImage
:
'
windows-2019'
# pool:
strategy
:
# vmImage: 'windows-2019'
matrix
:
# strategy:
nodejs-1
:
# matrix:
group
:
1/4
# nodejs-1:
nodejs-2
:
# group: 1/4
group
:
2/4
# nodejs-2:
nodejs-3
:
# group: 2/4
group
:
3/4
# nodejs-3:
nodejs-4
:
# group: 3/4
group
:
4/4
# nodejs-4:
steps
:
# group: 4/4
-
checkout
:
none
# steps:
-
script
:
|
# - checkout: none
wmic datafile where name="C:\\Program Files (x86)\\Google\\Chrome\\Application\\chrome.exe" get Version /value
# - script: |
displayName
:
'
List
Chrome
version'
# wmic datafile where name="C:\\Program Files (x86)\\Google\\Chrome\\Application\\chrome.exe" get Version /value
-
task
:
NodeTool@0
# displayName: 'List Chrome version'
inputs
:
# - task: NodeTool@0
versionSpec
:
$(node_version)
# inputs:
displayName
:
'
Install
Node.js'
# versionSpec: $(node_version)
-
task
:
Cache@2
# displayName: 'Install Node.js'
inputs
:
# - task: Cache@2
# use deterministic cache key that is specific
# inputs:
# to this test run
# # use deterministic cache key that is specific
key
:
$(Build.SourceVersion)
# # to this test run
path
:
$(System.DefaultWorkingDirectory)
# key: $(Build.SourceVersion)
displayName
:
Cache Build
# path: $(System.DefaultWorkingDirectory)
-
script
:
|
# displayName: Cache Build
node run-tests.js -g $(group) --timings --azure
# - script: |
displayName
:
'
Run
tests'
# node run-tests.js -g $(group) --timings --azure
# displayName: 'Run tests'
test/integration/production/test/index.test.js
View file @
010a31cf
...
@@ -917,26 +917,30 @@ describe('Production Usage', () => {
...
@@ -917,26 +917,30 @@ describe('Production Usage', () => {
expect
(
missing
).
toBe
(
false
)
expect
(
missing
).
toBe
(
false
)
})
})
it
(
'should preserve query when hard navigating from page 404'
,
async
()
=>
{
if
(
global
.
browserName
!==
'internet explorer'
)
{
const
browser
=
await
webdriver
(
appPort
,
'/'
)
it
(
'should preserve query when hard navigating from page 404'
,
async
()
=>
{
await
browser
.
eval
(
`(function() {
const
browser
=
await
webdriver
(
appPort
,
'/'
)
window.beforeNav = 1
await
browser
.
eval
(
`(function() {
window.next.router.push({
window.beforeNav = 1
pathname: '/non-existent',
window.next.router.push({
query: { hello: 'world' }
pathname: '/non-existent',
})
query: { hello: 'world' }
})()`
)
})
})()`
)
await
check
(
await
check
(
()
=>
browser
.
eval
(
'document.documentElement.innerHTML'
),
()
=>
browser
.
eval
(
'document.documentElement.innerHTML'
),
/page could not be found/
/page could not be found/
)
)
expect
(
await
browser
.
eval
(
'window.beforeNav'
)).
toBe
(
null
)
expect
(
await
browser
.
eval
(
'window.beforeNav'
)).
toBe
(
null
)
expect
(
await
browser
.
eval
(
'window.location.hash'
)).
toBe
(
''
)
expect
(
await
browser
.
eval
(
'window.location.hash'
)).
toBe
(
''
)
expect
(
await
browser
.
eval
(
'window.location.search'
)).
toBe
(
'?hello=world'
)
expect
(
await
browser
.
eval
(
'window.location.search'
)).
toBe
(
'?hello=world'
)
expect
(
await
browser
.
eval
(
'window.location.pathname'
)).
toBe
(
'/non-existent'
)
expect
(
await
browser
.
eval
(
'window.location.pathname'
)).
toBe
(
})
'/non-existent'
)
})
}
if
(
!
process
.
env
.
NEXT_PRIVATE_TEST_WEBPACK4_MODE
)
{
if
(
!
process
.
env
.
NEXT_PRIVATE_TEST_WEBPACK4_MODE
)
{
it
(
'should remove placeholder for next/image correctly'
,
async
()
=>
{
it
(
'should remove placeholder for next/image correctly'
,
async
()
=>
{
...
...
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