Skip to content

Commit

Permalink
stabilize test
Browse files Browse the repository at this point in the history
  • Loading branch information
ijjk committed Mar 31, 2022
1 parent d4ee343 commit e22e734
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions test/e2e/basepath.test.ts
Expand Up @@ -739,6 +739,10 @@ describe('basePath', () => {
it('should use urls with basepath in router events for hash changes', async () => {
const browser = await webdriver(next.url, `${basePath}/hello`)
try {
await check(
() => browser.eval('window.next.router.isReady ? "ready" : "no"'),
'ready'
)
await browser.eval('window._clearEventLog()')
await browser.elementByCss('#hash-change').click()

Expand All @@ -763,7 +767,12 @@ describe('basePath', () => {
it('should use urls with basepath in router events for cancelled routes', async () => {
const browser = await webdriver(next.url, `${basePath}/hello`)
try {
await check(
() => browser.eval('window.next.router.isReady ? "ready" : "no"'),
'ready'
)
await browser.eval('window._clearEventLog()')

await browser
.elementByCss('#slow-route')
.click()
Expand Down Expand Up @@ -793,6 +802,10 @@ describe('basePath', () => {
it('should use urls with basepath in router events for failed route change', async () => {
const browser = await webdriver(next.url, `${basePath}/hello`)
try {
await check(
() => browser.eval('window.next.router.isReady ? "ready" : "no"'),
'ready'
)
await browser.eval('window._clearEventLog()')
await browser.elementByCss('#error-route').click()

Expand Down

0 comments on commit e22e734

Please sign in to comment.