Skip to content

Commit

Permalink
Merge pull request #562 from WalletConnect/fix/failed-canary-results-…
Browse files Browse the repository at this point in the history
…not-uploaded

fix: failing canary results not uploaded
  • Loading branch information
chris13524 authored May 8, 2024
2 parents d3b3b62 + 4f7dd6d commit 2601720
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions tests/canary.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,22 @@ test.beforeEach(async ({ inboxPage, walletPage }) => {
await walletPage.handleSessionProposal(DEFAULT_SESSION_PARAMS)
})

test.afterEach(async ({ inboxPage, inboxValidator, walletValidator }) => {
test.afterEach(async ({ inboxPage, inboxValidator, walletValidator }, testInfo) => {
await inboxPage.disconnect()
await inboxValidator.expectDisconnected()
await walletValidator.expectDisconnected()

if (ENV !== 'dev') {
const duration: number = testInfo.duration
await uploadCanaryResultsToCloudWatch(
ENV,
REGION,
'https://app.web3inbox.com/',
'HappyPath.subscribe',
testInfo.status === 'passed',
duration
)
}
})

test('it should subscribe, receive messages and unsubscribe', async ({
Expand Down Expand Up @@ -59,16 +71,4 @@ test('it should subscribe, receive messages and unsubscribe', async ({
await inboxPage.page.getByText('Test Body').waitFor({ state: 'visible' })

expect(await inboxPage.page.getByText('Test Body').isVisible()).toEqual(true)

if (ENV !== 'dev') {
const duration: number = Date.now() - startTime
await uploadCanaryResultsToCloudWatch(
ENV,
REGION,
'https://app.web3inbox.com/',
'HappyPath.subscribe',
true,
duration
)
}
})

0 comments on commit 2601720

Please sign in to comment.