mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-11-22 09:57:02 +01:00
[FLASK] Fix flaky BIP-32 E2E test (#16255)
This commit is contained in:
parent
8075a39567
commit
359f782e7e
@ -25,8 +25,9 @@ describe('Test Snap bip-32', function () {
|
|||||||
await driver.fill('#password', 'correct horse battery staple');
|
await driver.fill('#password', 'correct horse battery staple');
|
||||||
await driver.press('#password', driver.Key.ENTER);
|
await driver.press('#password', driver.Key.ENTER);
|
||||||
|
|
||||||
// open a new tab and navigate to test snaps page and connect
|
// navigate to test snaps page and connect
|
||||||
await driver.openNewPage(TEST_SNAPS_WEBSITE_URL);
|
await driver.driver.get(TEST_SNAPS_WEBSITE_URL);
|
||||||
|
await driver.delay(1000);
|
||||||
|
|
||||||
// find and scroll to the correct card and click first
|
// find and scroll to the correct card and click first
|
||||||
const snapButton = await driver.findElement('#sendUpdateHello');
|
const snapButton = await driver.findElement('#sendUpdateHello');
|
||||||
@ -36,7 +37,7 @@ describe('Test Snap bip-32', function () {
|
|||||||
await driver.clickElement('#connectBip32');
|
await driver.clickElement('#connectBip32');
|
||||||
|
|
||||||
// switch to metamask extension and click connect
|
// switch to metamask extension and click connect
|
||||||
await driver.waitUntilXWindowHandles(3, 5000, 10000);
|
await driver.waitUntilXWindowHandles(2, 5000, 10000);
|
||||||
let windowHandles = await driver.getAllWindowHandles();
|
let windowHandles = await driver.getAllWindowHandles();
|
||||||
await driver.switchToWindowWithTitle(
|
await driver.switchToWindowWithTitle(
|
||||||
'MetaMask Notification',
|
'MetaMask Notification',
|
||||||
@ -50,9 +51,10 @@ describe('Test Snap bip-32', function () {
|
|||||||
10000,
|
10000,
|
||||||
);
|
);
|
||||||
|
|
||||||
await driver.delay(1000);
|
await driver.delay(2000);
|
||||||
|
|
||||||
// approve install of snap
|
// approve install of snap
|
||||||
|
await driver.waitUntilXWindowHandles(2, 5000, 10000);
|
||||||
windowHandles = await driver.getAllWindowHandles();
|
windowHandles = await driver.getAllWindowHandles();
|
||||||
await driver.switchToWindowWithTitle(
|
await driver.switchToWindowWithTitle(
|
||||||
'MetaMask Notification',
|
'MetaMask Notification',
|
||||||
@ -73,7 +75,7 @@ describe('Test Snap bip-32', function () {
|
|||||||
});
|
});
|
||||||
|
|
||||||
// switch back to test-snaps window
|
// switch back to test-snaps window
|
||||||
await driver.waitUntilXWindowHandles(2, 5000, 10000);
|
await driver.waitUntilXWindowHandles(1, 5000, 10000);
|
||||||
windowHandles = await driver.getAllWindowHandles();
|
windowHandles = await driver.getAllWindowHandles();
|
||||||
await driver.switchToWindowWithTitle('Test Snaps', windowHandles);
|
await driver.switchToWindowWithTitle('Test Snaps', windowHandles);
|
||||||
|
|
||||||
@ -94,7 +96,7 @@ describe('Test Snap bip-32', function () {
|
|||||||
tag: 'button',
|
tag: 'button',
|
||||||
});
|
});
|
||||||
|
|
||||||
await driver.waitUntilXWindowHandles(2, 5000, 10000);
|
await driver.waitUntilXWindowHandles(1, 5000, 10000);
|
||||||
windowHandles = await driver.getAllWindowHandles();
|
windowHandles = await driver.getAllWindowHandles();
|
||||||
await driver.switchToWindowWithTitle('Test Snaps', windowHandles);
|
await driver.switchToWindowWithTitle('Test Snaps', windowHandles);
|
||||||
|
|
||||||
@ -124,7 +126,7 @@ describe('Test Snap bip-32', function () {
|
|||||||
tag: 'button',
|
tag: 'button',
|
||||||
});
|
});
|
||||||
|
|
||||||
await driver.waitUntilXWindowHandles(2, 5000, 10000);
|
await driver.waitUntilXWindowHandles(1, 5000, 10000);
|
||||||
windowHandles = await driver.getAllWindowHandles();
|
windowHandles = await driver.getAllWindowHandles();
|
||||||
await driver.switchToWindowWithTitle('Test Snaps', windowHandles);
|
await driver.switchToWindowWithTitle('Test Snaps', windowHandles);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user