Skip to content

Commit

Permalink
better log
Browse files Browse the repository at this point in the history
  • Loading branch information
duckception committed Oct 22, 2023
1 parent b036027 commit 6becd6c
Showing 1 changed file with 18 additions and 4 deletions.
22 changes: 18 additions & 4 deletions wallets/metamask/test/e2e/metamask.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,13 +46,13 @@ const test = base.extend<{
throw new Error('[FIXTURE] MetaMask extension did not load in time')
}

context.on("close", () => {
console.log("context closed")
context.on('close', () => {
console.log('context closed')
})

const mmPage = context.pages()[1] as Page
mmPage.on("close", () => {
console.log("meta mask page closed")
mmPage.on('close', () => {
console.log('meta mask page closed')
})

sharedContext = context
Expand Down Expand Up @@ -103,6 +103,13 @@ describe('MetaMask', () => {
describe('lock', () => {
test('should lock the wallet', async ({ context }) => {
console.log('context.pages().length', context.pages().length)
console.log(
'context.pages()',
context
.pages()
.map((page) => page.url())
.join(', ')
)
const metamaskPage = context.pages()[1] as Page
await metamaskPage.bringToFront()

Expand All @@ -115,6 +122,13 @@ describe('MetaMask', () => {
describe('unlock', () => {
test('should unlock the wallet', async ({ context }) => {
console.log('context.pages().length', context.pages().length)
console.log(
'context.pages()',
context
.pages()
.map((page) => page.url())
.join(', ')
)
const metamaskPage = context.pages()[1] as Page
await unlock(metamaskPage, DEFAULT_PASSWORD)

Expand Down

0 comments on commit 6becd6c

Please sign in to comment.