1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-11-22 01:47:00 +01:00

Fix e2e incremental-secuirty test for mv3 build (#16265)

This commit is contained in:
seaona 2022-10-27 14:16:50 +02:00 committed by GitHub
parent 6c84e9604c
commit f03b3a872c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 0 deletions

View File

@ -130,6 +130,7 @@ describe('Incremental Security', function () {
const revealedSeedPhrase = await driver.findElement(
'.reveal-seed-phrase__secret-words',
);
await driver.waitForNonEmptyElement(revealedSeedPhrase);
const seedPhrase = await revealedSeedPhrase.getText();
assert.equal(seedPhrase.split(' ').length, 12);

View File

@ -161,6 +161,14 @@ class Driver {
return wrapElementWithAPI(element, this);
}
async waitForNonEmptyElement(element) {
await this.driver.wait(async () => {
const elemText = await element.getText();
const empty = elemText === '';
return !empty;
}, this.timeout);
}
async quit() {
await this.driver.quit();
}