Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

E2E: update isElementPresent usages #20112

Merged
merged 1 commit into from
Jul 20, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions test/e2e/nft/send-nft.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,6 @@ describe('Send NFT', function () {
await driver.clickElement({ text: 'Next', tag: 'button' });

// Edit the NFT, ensure same address, and move forward
await driver.isElementPresentAndVisible(
'[data-testid="confirm-page-back-edit-button"]',
);
await driver.clickElement(
'[data-testid="confirm-page-back-edit-button"]',
);
Expand Down
11 changes: 5 additions & 6 deletions test/e2e/tests/onboarding.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -162,12 +162,11 @@ describe('MetaMask onboarding', function () {
);

// Check that the error message is displayed for the password fields
await driver.isElementPresent(
// eslint-disable-next-line prettier/prettier
{ text: "Passwords don't match", tag: 'h6' },
true,
);

const passwordErrorIsDisplayed = await driver.isElementPresent({
text: "Passwords don't match",
css: 'h6',
});
assert.equal(passwordErrorIsDisplayed, true);
// Check that the "Confirm Password" button is disabled
const confirmPasswordButton = await driver.findElement(
'[data-testid="create-password-wallet"]',
Expand Down
12 changes: 5 additions & 7 deletions test/e2e/tests/settings-security-reveal-srp.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,11 @@ describe('Reveal SRP through settings', function () {
await completeSRPRevealQuiz(driver);
await driver.fill('#password-box', wrongTestPassword);
await driver.press('#password-box', driver.Key.ENTER);
await driver.isElementPresent(
{
css: '.mm-help-text',
text: 'Incorrect password',
},
true,
);
const passwordErrorIsDisplayed = await driver.isElementPresent({
css: '.mm-help-text',
text: 'Incorrect password',
});
assert.equal(passwordErrorIsDisplayed, true);
},
);
});
Expand Down