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

update isElementPresent usages (#20112)

This commit is contained in:
Peter 2023-07-20 10:22:29 -04:00 committed by GitHub
parent 26225aabe0
commit 4422ce6eef
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 10 additions and 16 deletions

View File

@ -40,9 +40,6 @@ describe('Send NFT', function () {
await driver.clickElement({ text: 'Next', tag: 'button' }); await driver.clickElement({ text: 'Next', tag: 'button' });
// Edit the NFT, ensure same address, and move forward // Edit the NFT, ensure same address, and move forward
await driver.isElementPresentAndVisible(
'[data-testid="confirm-page-back-edit-button"]',
);
await driver.clickElement( await driver.clickElement(
'[data-testid="confirm-page-back-edit-button"]', '[data-testid="confirm-page-back-edit-button"]',
); );

View File

@ -162,12 +162,11 @@ describe('MetaMask onboarding', function () {
); );
// Check that the error message is displayed for the password fields // Check that the error message is displayed for the password fields
await driver.isElementPresent( const passwordErrorIsDisplayed = await driver.isElementPresent({
// eslint-disable-next-line prettier/prettier text: "Passwords don't match",
{ text: "Passwords don't match", tag: 'h6' }, css: 'h6',
true, });
); assert.equal(passwordErrorIsDisplayed, true);
// Check that the "Confirm Password" button is disabled // Check that the "Confirm Password" button is disabled
const confirmPasswordButton = await driver.findElement( const confirmPasswordButton = await driver.findElement(
'[data-testid="create-password-wallet"]', '[data-testid="create-password-wallet"]',

View File

@ -27,13 +27,11 @@ describe('Reveal SRP through settings', function () {
await completeSRPRevealQuiz(driver); await completeSRPRevealQuiz(driver);
await driver.fill('#password-box', wrongTestPassword); await driver.fill('#password-box', wrongTestPassword);
await driver.press('#password-box', driver.Key.ENTER); await driver.press('#password-box', driver.Key.ENTER);
await driver.isElementPresent( const passwordErrorIsDisplayed = await driver.isElementPresent({
{ css: '.mm-help-text',
css: '.mm-help-text', text: 'Incorrect password',
text: 'Incorrect password', });
}, assert.equal(passwordErrorIsDisplayed, true);
true,
);
}, },
); );
}); });