mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-22 05:35:13 +00:00
ci: retry flaky test when running in Windows with Webpack (#25543)
This commit is contained in:
parent
e76b41786d
commit
f665434781
@ -619,29 +619,33 @@ describe('nuxt links', () => {
|
|||||||
{ retry: isWebpack && isWindows ? 10 : 0 }
|
{ retry: isWebpack && isWindows ? 10 : 0 }
|
||||||
)
|
)
|
||||||
|
|
||||||
it('expect scroll to top on nested pages', async () => {
|
it('expect scroll to top on nested pages',
|
||||||
// #20523
|
async () => {
|
||||||
const page = await createPage('/nested/foo/test', {
|
// #20523
|
||||||
viewport: {
|
const page = await createPage('/nested/foo/test', {
|
||||||
width: 1000,
|
viewport: {
|
||||||
height: 1000
|
width: 1000,
|
||||||
}
|
height: 1000
|
||||||
})
|
}
|
||||||
await page.waitForFunction(path => window.useNuxtApp?.()._route.fullPath === path, `/nested/foo/test`)
|
})
|
||||||
|
await page.waitForFunction(path => window.useNuxtApp?.()._route.fullPath === path, `/nested/foo/test`)
|
||||||
|
|
||||||
await page.locator('#user-test').scrollIntoViewIfNeeded()
|
await page.locator('#user-test').scrollIntoViewIfNeeded()
|
||||||
expect(await page.evaluate(() => window.scrollY)).toBeGreaterThan(0)
|
expect(await page.evaluate(() => window.scrollY)).toBeGreaterThan(0)
|
||||||
await page.locator('#user-test').click()
|
await page.locator('#user-test').click()
|
||||||
await page.waitForFunction(path => window.useNuxtApp?.()._route.fullPath === path, `/nested/foo/user-test`)
|
await page.waitForFunction(path => window.useNuxtApp?.()._route.fullPath === path, `/nested/foo/user-test`)
|
||||||
expect(await page.evaluate(() => window.scrollY)).toBe(0)
|
expect(await page.evaluate(() => window.scrollY)).toBe(0)
|
||||||
|
|
||||||
await page.locator('#test').scrollIntoViewIfNeeded()
|
await page.locator('#test').scrollIntoViewIfNeeded()
|
||||||
expect(await page.evaluate(() => window.scrollY)).toBeGreaterThan(0)
|
expect(await page.evaluate(() => window.scrollY)).toBeGreaterThan(0)
|
||||||
await page.locator('#test').click()
|
await page.locator('#test').click()
|
||||||
await page.waitForFunction(path => window.useNuxtApp?.()._route.fullPath === path, `/nested/foo/test`)
|
await page.waitForFunction(path => window.useNuxtApp?.()._route.fullPath === path, `/nested/foo/test`)
|
||||||
expect(await page.evaluate(() => window.scrollY)).toBe(0)
|
expect(await page.evaluate(() => window.scrollY)).toBe(0)
|
||||||
await page.close()
|
await page.close()
|
||||||
})
|
},
|
||||||
|
// Flaky when run on windows + webpack
|
||||||
|
{ retry: isWebpack && isWindows ? 10 : 0 }
|
||||||
|
)
|
||||||
})
|
})
|
||||||
|
|
||||||
describe('head tags', () => {
|
describe('head tags', () => {
|
||||||
|
Loading…
Reference in New Issue
Block a user