Skip to content

Commit

Permalink
Increase timeout on integration tests
Browse files Browse the repository at this point in the history
  • Loading branch information
PaulLeCam committed Apr 26, 2021
1 parent f4fc21a commit f771a5f
Showing 1 changed file with 12 additions and 5 deletions.
17 changes: 12 additions & 5 deletions apps/integration/test/browsers.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,12 @@ beforeAll(async () => {
})

describe('connect flow', () => {
jest.setTimeout(60000)
jest.setTimeout(120000)

beforeEach(async () => {
await jestPlaywright.resetContext()
await page.goto('http://localhost:30000/app.html')
page.setDefaultTimeout(120000)
// page.on('console', (consoleObj) => console.log(consoleObj.text()))
})

Expand Down Expand Up @@ -43,7 +44,7 @@ describe('connect flow', () => {
}, providerType)

// Continue button
const button = await frame.waitForSelector('#accept', { timeout: 60000 })
const button = await frame.waitForSelector('#accept')
await button.click()
await new Promise((res) =>
setTimeout(() => {
Expand All @@ -52,14 +53,17 @@ describe('connect flow', () => {
)

// Continue create account
const buttontwo = await frame.waitForSelector('#accept', { timeout: 60000 })
const buttontwo = await frame.waitForSelector('#accept')
await buttontwo.click()
await page.waitForSelector('.threeid-connect', { state: 'hidden' })

const [did, account] = await didAccountPromise

// Check localStorage contents
const linksState = await frame.evaluate((key) => localStorage.getItem(key), `LINK_${account}`)
const linksState = await frame.evaluate(
(key) => localStorage.getItem(key),
`LINK_${account}`
)
expect(JSON.parse(linksState)).toBe(did)

const accountsState = await frame.evaluate((key) => localStorage.getItem(key), `ACC_${did}`)
Expand Down Expand Up @@ -120,7 +124,10 @@ describe('connect flow', () => {
expect(aka.accounts[1].claim).toMatchSnapshot()

// Check localStorage contents
const linksState = await frame.evaluate((key) => localStorage.getItem(key), `LINK_${account}`)
const linksState = await frame.evaluate(
(key) => localStorage.getItem(key),
`LINK_${account}`
)
expect(JSON.parse(linksState)).toBe(did)
})
}
Expand Down

0 comments on commit f771a5f

Please sign in to comment.