Unverified Commit 010a31cf authored by JJ Kasper's avatar JJ Kasper Committed by GitHub

Update azure tests (#26779)

parent 551b6149
...@@ -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'
...@@ -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 () => {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment