Skip to content

Commit

Permalink
Remove Firefox index shift
Browse files Browse the repository at this point in the history
  • Loading branch information
darkwing committed Jun 26, 2024
1 parent 73ba727 commit a394768
Showing 1 changed file with 2 additions and 11 deletions.
13 changes: 2 additions & 11 deletions test/e2e/tests/request-queuing/ui.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,24 +29,15 @@ async function openDappAndSwitchChain(
chainId,
notificationWindowIndex = 3,
) {
if (IS_FIREFOX) {
await driver.delay(veryLargeDelayMs);
}
// Open the dapp
await openDapp(driver, undefined, dappUrl);

// Fix for Firefox / Non-MV3
let adjustedNotificationWindowIndex = notificationWindowIndex;
if (IS_FIREFOX) {
adjustedNotificationWindowIndex -= 1;
}

// Connect to the dapp
await driver.findClickableElement({ text: 'Connect', tag: 'button' });
await driver.clickElement('#connectButton');
await driver.delay(regularDelayMs);

await switchToNotificationWindow(driver, adjustedNotificationWindowIndex);
await switchToNotificationWindow(driver, notificationWindowIndex);

await driver.clickElement({
text: 'Next',
Expand Down Expand Up @@ -75,7 +66,7 @@ async function openDappAndSwitchChain(
);

await driver.delay(veryLargeDelayMs);
await switchToNotificationWindow(driver, adjustedNotificationWindowIndex);
await switchToNotificationWindow(driver, notificationWindowIndex);

await driver.findClickableElement(
'[data-testid="confirmation-submit-button"]',
Expand Down

0 comments on commit a394768

Please sign in to comment.