Skip to content

Commit

Permalink
Fix E2E
Browse files Browse the repository at this point in the history
  • Loading branch information
FrederikBolding committed Oct 21, 2024
1 parent 288f986 commit dc76dec
Showing 1 changed file with 3 additions and 31 deletions.
34 changes: 3 additions & 31 deletions test/e2e/snaps/test-snap-siginsights.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,9 @@ describe('Test Snap Signature Insights', function () {
tag: 'p',
});

// Click down arrow
await driver.clickElementSafe('[aria-label="Scroll down"]');

// click sign button
await driver.clickElementAndWaitForWindowToClose(
'[data-testid="confirm-footer-button"]',
Expand Down Expand Up @@ -115,22 +118,11 @@ describe('Test Snap Signature Insights', function () {
});

// click down arrow
// await driver.waitForSelector('[aria-label="Scroll down"]');
await driver.clickElementSafe('[aria-label="Scroll down"]');

// required: delay for scroll to render
await driver.delay(500);

// click down arrow
await driver.waitForSelector({
text: 'Signature Insights Example Snap',
tag: 'span',
});
await driver.clickElement({
text: 'Signature Insights Example Snap',
tag: 'span',
});

// look for returned signature insights data
await driver.waitForSelector({
text: '1',
Expand Down Expand Up @@ -178,16 +170,6 @@ describe('Test Snap Signature Insights', function () {
// required: delay for scroll to render
await driver.delay(500);

// click signature insights
await driver.waitForSelector({
text: 'Signature Insights Example Snap',
tag: 'span',
});
await driver.clickElement({
text: 'Signature Insights Example Snap',
tag: 'span',
});

// look for returned signature insights data
await driver.waitForSelector({
text: '0xCcCCccccCCCCcCCCCCCcCcCccCcCCCcCcccccccC has been identified as a malicious verifying contract.',
Expand Down Expand Up @@ -235,16 +217,6 @@ describe('Test Snap Signature Insights', function () {
// required: delay for scroll to render
await driver.delay(500);

// click signature insights
await driver.waitForSelector({
text: 'Signature Insights Example Snap',
tag: 'span',
});
await driver.clickElement({
text: 'Signature Insights Example Snap',
tag: 'span',
});

// look for returned signature insights data
await driver.waitForSelector({
text: '0xCcCCccccCCCCcCCCCCCcCcCccCcCCCcCcccccccC has been identified as a malicious verifying contract.',
Expand Down

0 comments on commit dc76dec

Please sign in to comment.