Skip to content

Commit

Permalink
Try fixing failing e2e tests
Browse files Browse the repository at this point in the history
  • Loading branch information
david0xd committed Jun 24, 2024
1 parent 2525138 commit 5b27216
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 0 deletions.
10 changes: 10 additions & 0 deletions test/e2e/accounts/common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,16 @@ export async function installSnapSimpleKeyring(
tag: 'button',
});

// wait for permissions popover, click checkboxes and confirm
await driver.waitForSelector('.mm-checkbox__input');
await driver.clickElement('.mm-checkbox__input');
await driver.waitForSelector(
'[data-testid="snap-install-warning-modal-confirm"]',
);
await driver.clickElement(
'[data-testid="snap-install-warning-modal-confirm"]',
);

await driver.waitForSelector({ text: 'OK' });

await driver.clickElement({
Expand Down
33 changes: 33 additions & 0 deletions test/e2e/accounts/create-snap-account.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,17 @@ describe('Create Snap Account', function (this: Suite) {
text: 'Confirm',
tag: 'button',
});

// wait for permissions popover, click checkboxes and confirm
await driver.waitForSelector('.mm-checkbox__input');
await driver.clickElement('.mm-checkbox__input');
await driver.waitForSelector(
'[data-testid="snap-install-warning-modal-confirm"]',
);
await driver.clickElement(
'[data-testid="snap-install-warning-modal-confirm"]',
);

await driver.waitForSelector({ text: 'OK' });
await driver.clickElement({
text: 'OK',
Expand Down Expand Up @@ -121,6 +132,17 @@ describe('Create Snap Account', function (this: Suite) {
text: 'Confirm',
tag: 'button',
});

// wait for permissions popover, click checkboxes and confirm
await driver.waitForSelector('.mm-checkbox__input');
await driver.clickElement('.mm-checkbox__input');
await driver.waitForSelector(
'[data-testid="snap-install-warning-modal-confirm"]',
);
await driver.clickElement(
'[data-testid="snap-install-warning-modal-confirm"]',
);

await driver.waitForSelector({ text: 'OK' });
await driver.clickElement({
text: 'OK',
Expand Down Expand Up @@ -213,6 +235,17 @@ describe('Create Snap Account', function (this: Suite) {
text: 'Confirm',
tag: 'button',
});

// wait for permissions popover, click checkboxes and confirm
await driver.waitForSelector('.mm-checkbox__input');
await driver.clickElement('.mm-checkbox__input');
await driver.waitForSelector(
'[data-testid="snap-install-warning-modal-confirm"]',
);
await driver.clickElement(
'[data-testid="snap-install-warning-modal-confirm"]',
);

await driver.waitForSelector({ text: 'OK' });
await driver.clickElement({
text: 'OK',
Expand Down

0 comments on commit 5b27216

Please sign in to comment.