Skip to content

Commit 010a31c

Browse files
authored
Update azure tests (#26779)
1 parent 551b614 commit 010a31c

File tree

2 files changed

+56
-51
lines changed

2 files changed

+56
-51
lines changed

azure-pipelines.yml

Lines changed: 34 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -111,36 +111,37 @@ stages:
111111
- script: |
112112
node run-tests.js -g 1/1 --timings --azure --type unit
113113
displayName: 'Run tests'
114-
115-
- job: test_chrome_integration
116-
pool:
117-
vmImage: 'windows-2019'
118-
strategy:
119-
matrix:
120-
nodejs-1:
121-
group: 1/4
122-
nodejs-2:
123-
group: 2/4
124-
nodejs-3:
125-
group: 3/4
126-
nodejs-4:
127-
group: 4/4
128-
steps:
129-
- checkout: none
130-
- script: |
131-
wmic datafile where name="C:\\Program Files (x86)\\Google\\Chrome\\Application\\chrome.exe" get Version /value
132-
displayName: 'List Chrome version'
133-
- task: NodeTool@0
134-
inputs:
135-
versionSpec: $(node_version)
136-
displayName: 'Install Node.js'
137-
- task: Cache@2
138-
inputs:
139-
# use deterministic cache key that is specific
140-
# to this test run
141-
key: $(Build.SourceVersion)
142-
path: $(System.DefaultWorkingDirectory)
143-
displayName: Cache Build
144-
- script: |
145-
node run-tests.js -g $(group) --timings --azure
146-
displayName: 'Run tests'
114+
# TODO: investigate re-enabling when stability matches running in
115+
# tests in ubuntu environment
116+
# - job: test_chrome_integration
117+
# pool:
118+
# vmImage: 'windows-2019'
119+
# strategy:
120+
# matrix:
121+
# nodejs-1:
122+
# group: 1/4
123+
# nodejs-2:
124+
# group: 2/4
125+
# nodejs-3:
126+
# group: 3/4
127+
# nodejs-4:
128+
# group: 4/4
129+
# steps:
130+
# - checkout: none
131+
# - script: |
132+
# wmic datafile where name="C:\\Program Files (x86)\\Google\\Chrome\\Application\\chrome.exe" get Version /value
133+
# displayName: 'List Chrome version'
134+
# - task: NodeTool@0
135+
# inputs:
136+
# versionSpec: $(node_version)
137+
# displayName: 'Install Node.js'
138+
# - task: Cache@2
139+
# inputs:
140+
# # use deterministic cache key that is specific
141+
# # to this test run
142+
# key: $(Build.SourceVersion)
143+
# path: $(System.DefaultWorkingDirectory)
144+
# displayName: Cache Build
145+
# - script: |
146+
# node run-tests.js -g $(group) --timings --azure
147+
# displayName: 'Run tests'

test/integration/production/test/index.test.js

Lines changed: 22 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -917,26 +917,30 @@ describe('Production Usage', () => {
917917
expect(missing).toBe(false)
918918
})
919919

920-
it('should preserve query when hard navigating from page 404', async () => {
921-
const browser = await webdriver(appPort, '/')
922-
await browser.eval(`(function() {
923-
window.beforeNav = 1
924-
window.next.router.push({
925-
pathname: '/non-existent',
926-
query: { hello: 'world' }
927-
})
928-
})()`)
920+
if (global.browserName !== 'internet explorer') {
921+
it('should preserve query when hard navigating from page 404', async () => {
922+
const browser = await webdriver(appPort, '/')
923+
await browser.eval(`(function() {
924+
window.beforeNav = 1
925+
window.next.router.push({
926+
pathname: '/non-existent',
927+
query: { hello: 'world' }
928+
})
929+
})()`)
929930

930-
await check(
931-
() => browser.eval('document.documentElement.innerHTML'),
932-
/page could not be found/
933-
)
931+
await check(
932+
() => browser.eval('document.documentElement.innerHTML'),
933+
/page could not be found/
934+
)
934935

935-
expect(await browser.eval('window.beforeNav')).toBe(null)
936-
expect(await browser.eval('window.location.hash')).toBe('')
937-
expect(await browser.eval('window.location.search')).toBe('?hello=world')
938-
expect(await browser.eval('window.location.pathname')).toBe('/non-existent')
939-
})
936+
expect(await browser.eval('window.beforeNav')).toBe(null)
937+
expect(await browser.eval('window.location.hash')).toBe('')
938+
expect(await browser.eval('window.location.search')).toBe('?hello=world')
939+
expect(await browser.eval('window.location.pathname')).toBe(
940+
'/non-existent'
941+
)
942+
})
943+
}
940944

941945
if (!process.env.NEXT_PRIVATE_TEST_WEBPACK4_MODE) {
942946
it('should remove placeholder for next/image correctly', async () => {

0 commit comments

Comments
 (0)