Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/revoke permission to all #932

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 20 additions & 2 deletions commands/metamask.js
Original file line number Diff line number Diff line change
Expand Up @@ -1348,7 +1348,7 @@ const metamask = {
);
return true;
},
async confirmPermisionToApproveAll() {
async confirmPermissionToApproveAll() {
const notificationPage = await playwright.switchToMetamaskNotification();
await playwright.waitAndClick(
notificationPageElements.allowToSpendButton,
Expand All @@ -1361,7 +1361,7 @@ const metamask = {
);
return true;
},
async rejectPermisionToApproveAll() {
async rejectPermissionToApproveAll() {
const notificationPage = await playwright.switchToMetamaskNotification();
await playwright.waitAndClick(
notificationPageElements.allowToSpendButton,
Expand All @@ -1374,6 +1374,24 @@ const metamask = {
);
return true;
},
async confirmRevokePermissionToAll() {
const notificationPage = await playwright.switchToMetamaskNotification();
await playwright.waitAndClick(
notificationPageElements.allowToSpendButton,
notificationPage,
{ waitForEvent: 'close' },
);
return true;
},
async rejectRevokePermissionToAll() {
const notificationPage = await playwright.switchToMetamaskNotification();
await playwright.waitAndClick(
notificationPageElements.rejectToSpendButton,
notificationPage,
{ waitForEvent: 'close' },
);
return true;
},
async allowToAddNetwork({ waitForEvent } = {}) {
const notificationPage = await playwright.switchToMetamaskNotification();
if (waitForEvent) {
Expand Down
Loading
Loading