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 Phishing Detection Via Iframe should redirect users to the the MetaMask Phishing Detection page when an iframe domain is on the phishing blocklist #28293

Open
wants to merge 4 commits into
base: develop
Choose a base branch
from
Open
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
19 changes: 18 additions & 1 deletion test/e2e/tests/phishing-controller/phishing-detection.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,12 @@ describe('Phishing Detection', function () {
await unlockWallet(driver);
await openDapp(driver);
await driver.switchToWindowWithTitle('MetaMask Phishing Detection');

// we need to wait for this selector to mitigate a race condition on the phishing page site
// see more here https://github.com/MetaMask/phishing-warning/pull/173
await driver.waitForSelector({
testId: 'unsafe-continue-loaded',
});
await driver.clickElement({
text: 'Proceed anyway',
});
Expand Down Expand Up @@ -103,10 +109,15 @@ describe('Phishing Detection', function () {
}

await driver.switchToWindowWithTitle('MetaMask Phishing Detection');

// we need to wait for this selector to mitigate a race condition on the phishing page site
// see more here https://github.com/MetaMask/phishing-warning/pull/173
await driver.waitForSelector({
testId: 'unsafe-continue-loaded',
});
await driver.clickElement({
text: 'Proceed anyway',
});

await driver.wait(until.titleIs(WINDOW_TITLES.TestDApp), 10000);
};
}
Expand Down Expand Up @@ -169,6 +180,12 @@ describe('Phishing Detection', function () {
text: 'Open this warning in a new tab',
});
await driver.switchToWindowWithTitle('MetaMask Phishing Detection');

// we need to wait for this selector to mitigate a race condition on the phishing page site
// see more here https://github.com/MetaMask/phishing-warning/pull/173
await driver.waitForSelector({
testId: 'unsafe-continue-loaded',
});
await driver.clickElement({
text: 'Proceed anyway',
});
Expand Down