Skip to content

Commit

Permalink
fix: wrong tests
Browse files Browse the repository at this point in the history
  • Loading branch information
kazupon committed Jul 7, 2023
1 parent 9ed5fdd commit 96be862
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions specs/lang_switcher.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,15 +75,15 @@ test('wait for page transition', async () => {
const page = await createPage()
await page.goto(home)

expect(await getText(page, '#lang-switcher-current-locale code')).toEqual('en')

// click `fr` lang switching
await page.locator('#lang-switcher-with-nuxt-link a').click()
expect(await getText(page, '#lang-switcher-current-locale code')).toEqual('en')
await page.waitForTimeout(3000)
expect(await getText(page, '#lang-switcher-current-locale code')).toEqual('fr')

// click `en` lang switching
await page.locator('#lang-switcher-with-nuxt-link a').click()
expect(await getText(page, '#lang-switcher-current-locale code')).toEqual('fr')
await page.waitForTimeout(3000)
expect(await getText(page, '#lang-switcher-current-locale code')).toEqual('en')
})

0 comments on commit 96be862

Please sign in to comment.