diff --git a/wallets/metamask/test/e2e/metamask/approvePermission.spec.ts b/wallets/metamask/test/e2e/metamask/approvePermission.spec.ts index 02a2b04cb..9377394bd 100644 --- a/wallets/metamask/test/e2e/metamask/approvePermission.spec.ts +++ b/wallets/metamask/test/e2e/metamask/approvePermission.spec.ts @@ -2,7 +2,7 @@ import { testWithMetaMask } from '../testWithMetaMask' const test = testWithMetaMask -const { describe } = test +const { describe, expect } = test describe('with default gas setting', () => { test('should approve tokens with the default limit by default', async ({ page, metamask, deployToken }) => { @@ -78,3 +78,18 @@ describe('with custom gas setting', () => { }) }) }) + +test('should request permissions', async ({ page, metamask }) => { + await page.locator('#revokeAccountsPermission').click() + await page.locator('#getPermissions').click() + + const noPermission = await page.locator('#permissionsResult').innerText() + expect(noPermission).toBe('No permissions found.') + + await page.locator('#requestPermissions').click() + + await metamask.connectToDapp() + + const requestedPermissions = await page.locator('#permissionsResult').innerText() + expect(requestedPermissions).toBe('eth_accounts') +}) diff --git a/wallets/metamask/test/e2e/metamask/connectToDapp.spec.ts b/wallets/metamask/test/e2e/metamask/connectToDapp.spec.ts index 30aef58c5..0a9e56292 100644 --- a/wallets/metamask/test/e2e/metamask/connectToDapp.spec.ts +++ b/wallets/metamask/test/e2e/metamask/connectToDapp.spec.ts @@ -32,6 +32,6 @@ test('should connect multiple wallets to dapp', async ({ context, page, metamask await metamask.connectToDapp(['Account x2', 'Account 1']) await expect(page.locator('#accounts')).toHaveText( - '0x90f79bf6eb2c4f870365e785982e1f101e93b906,0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266' + '0x70997970c51812dc3a010c7d01b50e0d17dc79c8,0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266' ) })