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

fix: flaky test Navigation Signature - Different signature types initiates multiple signatures and rejects all #27481

Merged
merged 2 commits into from
Sep 30, 2024
Merged
Changes from 1 commit
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
7 changes: 4 additions & 3 deletions test/e2e/tests/confirmations/navigation.spec.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import { strict as assert } from 'assert';
import { TransactionEnvelopeType } from '@metamask/transaction-controller';
import { Suite } from 'mocha';
import { By } from 'selenium-webdriver';
import {
DAPP_HOST_ADDRESS,
WINDOW_TITLES,
openDapp,
regularDelayMs,
unlockWallet,
WINDOW_TITLES,
} from '../../helpers';
import { Driver } from '../../webdriver/driver';
import { withRedesignConfirmationFixtures } from './helpers';
Expand Down Expand Up @@ -98,7 +98,6 @@ describe('Navigation Signature - Different signature types', function (this: Sui
await unlockWallet(driver);
await openDapp(driver);
await queueSignatures(driver);
await driver.delay(regularDelayMs);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this makes the test fail when the delay is not enough


await driver.clickElement('[data-testid="confirm-nav__reject-all"]');

Expand Down Expand Up @@ -166,11 +165,13 @@ async function queueSignatures(driver: Driver) {
await driver.waitUntilXWindowHandles(3);
await driver.switchToWindowWithTitle(WINDOW_TITLES.Dialog);
await driver.findElement({ text: 'Reject all' });
await driver.findElement(By.xpath("//div[normalize-space(.)='1 of 2']"));

await driver.switchToWindowWithTitle(WINDOW_TITLES.TestDApp);
await driver.clickElement('#signTypedDataV4');
await driver.waitUntilXWindowHandles(3);
await driver.switchToWindowWithTitle(WINDOW_TITLES.Dialog);
await driver.findElement(By.xpath("//div[normalize-space(.)='1 of 3']"));
}

async function queueSignaturesAndTransactions(driver: Driver) {
Expand Down
Loading