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:
parent
6c84e9604c
commit
f03b3a872c
@ -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);
|
||||
|
||||
|
@ -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();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user