Skip to content

Commit

Permalink
Add timeout to extension tests
Browse files Browse the repository at this point in the history
  • Loading branch information
stefanw committed Jan 27, 2024
1 parent f34eac0 commit ea659e3
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions tests/extension.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ test('content script', async ({ page, context }) => {
await expect(shadowHTML).toContain('Pressedatenbank wird aufgerufen...')
// library login page is opened in a new tab
// but not as a popup from current page, instead via the background script
await page.waitForTimeout(300)
const pages = context.pages()
console.log(pages.map(p => p.url()))
const newPage = pages.find(p => p.url().indexOf('https://www.voebb.de/oidcp/authorize') !== -1)
Expand All @@ -22,6 +23,7 @@ test('popup page', async ({ page, extensionId, context }) => {
const settingsLink = await page.locator('#settings')
await expect(settingsLink).toHaveText('Einstellungen')
await settingsLink.click()
await page.waitForTimeout(300)
const pages = context.pages()
console.log(pages.map(p => p.url()))
const newPage = pages.find(p => p.url().indexOf(`chrome-extension:https://${extensionId}/options/options.html`) !== -1)
Expand Down

0 comments on commit ea659e3

Please sign in to comment.