mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-11-22 09:57:02 +01:00
Fix ipfs-ens-resolution.spec.js E2E intermittent failure (#20311)
* Fix ipfs-ens-resolution.spec.js E2E intermittent failure * Wait for URL change instead of large delay
This commit is contained in:
parent
4c37448c97
commit
034626a57d
@ -1,6 +1,5 @@
|
|||||||
const { strict: assert } = require('assert');
|
|
||||||
const { buildWebDriver } = require('../webdriver');
|
const { buildWebDriver } = require('../webdriver');
|
||||||
const { withFixtures } = require('../helpers');
|
const { withFixtures, tinyDelayMs } = require('../helpers');
|
||||||
const FixtureBuilder = require('../fixture-builder');
|
const FixtureBuilder = require('../fixture-builder');
|
||||||
|
|
||||||
describe('Settings', function () {
|
describe('Settings', function () {
|
||||||
@ -24,8 +23,10 @@ describe('Settings', function () {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Ensure that the redirect to ENS Domains has happened
|
// Ensure that the redirect to ENS Domains has happened
|
||||||
|
await driver.wait(async () => {
|
||||||
const currentUrl = await driver.getCurrentUrl();
|
const currentUrl = await driver.getCurrentUrl();
|
||||||
assert.equal(currentUrl, ENS_DESTINATION_URL);
|
return currentUrl === ENS_DESTINATION_URL;
|
||||||
|
}, tinyDelayMs);
|
||||||
|
|
||||||
await driver.quit();
|
await driver.quit();
|
||||||
});
|
});
|
||||||
@ -71,8 +72,10 @@ describe('Settings', function () {
|
|||||||
|
|
||||||
// Ensure that the redirect to ENS Domains does not happen
|
// Ensure that the redirect to ENS Domains does not happen
|
||||||
// Instead, the domain will be kept which is a 404
|
// Instead, the domain will be kept which is a 404
|
||||||
|
await driver.wait(async () => {
|
||||||
const currentUrl = await driver.getCurrentUrl();
|
const currentUrl = await driver.getCurrentUrl();
|
||||||
assert.equal(currentUrl, ENS_NAME_URL);
|
return currentUrl === ENS_NAME_URL;
|
||||||
|
}, tinyDelayMs);
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user