From 77d5a73ccc7f58b08d5fdb880fbf7581061b7bfc Mon Sep 17 00:00:00 2001 From: Hugo Dias Date: Mon, 17 Jul 2023 22:15:09 +0100 Subject: [PATCH] chore: improve ci stability --- .github/workflows/manual.yml | 2 +- packages/snap/src/utils.ts | 2 +- packages/snap/test/e2e/1-methods.spec.ts | 6 +++--- packages/snap/test/e2e/messages.spec.ts | 4 ++-- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/manual.yml b/.github/workflows/manual.yml index 5f9a131b..a9fb1fc5 100644 --- a/.github/workflows/manual.yml +++ b/.github/workflows/manual.yml @@ -42,7 +42,7 @@ jobs: METAMASK_MNEMONIC: ${{ inputs.metamask-seed }} METAMASK_PASSWORD: ${{ inputs.metamask-password }} METAMASK_SNAP_ID: ${{ inputs.metamask-snap-id }} - MEtAMASK_SNAP_VERSION: ${{ inputs.metamask-snap-version }} + METAMASK_SNAP_VERSION: ${{ inputs.metamask-snap-version }} - uses: actions/upload-artifact@v3 if: always() with: diff --git a/packages/snap/src/utils.ts b/packages/snap/src/utils.ts index 240f7008..996fb73b 100644 --- a/packages/snap/src/utils.ts +++ b/packages/snap/src/utils.ts @@ -205,7 +205,7 @@ export async function snapDialog( params, }) - return result as boolean + return result === true } /** * Update the messages in the state diff --git a/packages/snap/test/e2e/1-methods.spec.ts b/packages/snap/test/e2e/1-methods.spec.ts index cf60f4ab..164bf8aa 100644 --- a/packages/snap/test/e2e/1-methods.spec.ts +++ b/packages/snap/test/e2e/1-methods.spec.ts @@ -168,8 +168,8 @@ test.describe('filsnap testnet', () => { const from = 't1pc2apytmdas3sn5ylwhfa32jfpx7ez7ykieelna' const to = 't1sfizuhpgjqyl4yjydlebncvecf3q2cmeeathzwi' - metamask.on('notification', (page) => { - void page.getByRole('button').filter({ hasText: 'Approve' }).click() + metamask.on('notification', async (page) => { + await page.getByRole('button').filter({ hasText: 'Approve' }).click() }) const message = { @@ -186,7 +186,7 @@ test.describe('filsnap testnet', () => { }) if (signedMessageResponse.error != null) { - throw new Error('Failed to sign message') + throw new Error(signedMessageResponse.error.message) } const sendResponse = await metamask.invokeSnap({ diff --git a/packages/snap/test/e2e/messages.spec.ts b/packages/snap/test/e2e/messages.spec.ts index 8792bcfa..f0af7d6d 100644 --- a/packages/snap/test/e2e/messages.spec.ts +++ b/packages/snap/test/e2e/messages.spec.ts @@ -48,8 +48,8 @@ test.describe('snap messages', () => { const from = 't1pc2apytmdas3sn5ylwhfa32jfpx7ez7ykieelna' const to = 't1sfizuhpgjqyl4yjydlebncvecf3q2cmeeathzwi' - metamask.on('notification', (page) => { - void page.getByRole('button').filter({ hasText: 'Approve' }).click() + metamask.on('notification', async (page) => { + await page.getByRole('button').filter({ hasText: 'Approve' }).click() }) const message = {