Skip to content

Commit

Permalink
fix: Flaky test to support changes introduced in PR 23155 (#24195)
Browse files Browse the repository at this point in the history
## **Description**
Change in the PR fixes the flaky test CircleCI job -
test-e2e-chrome-vault-decryption

https://app.circleci.com/pipelines/github/MetaMask/metamask-extension/77436/workflows/983b4b1c-104a-4acc-ad35-36fe09a03a29/jobs/2685234

[![Open in GitHub
Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/MetaMask/metamask-extension/pull/24195?quickstart=1)

## **Related issues**

Fixes: 
#24180
#1722

## **Manual testing steps**

Run the test in codespace or locally --> Checkout to the branch
yarn
yarn dist
yarn test:e2e:single test/e2e/vault-decryption-chrome.spec.js
--browser=chrome

## **Pre-merge author checklist**

- [x] I’ve followed [MetaMask Coding
Standards](https://github.com/MetaMask/metamask-extension/blob/develop/.github/guidelines/CODING_GUIDELINES.md).
- [x] I've completed the PR template to the best of my ability
- [ ] I’ve included tests if applicable
- [ ] I’ve documented my code using [JSDoc](https://jsdoc.app/) format
if applicable
- [ ] I’ve applied the right labels on the PR (see [labeling
guidelines](https://github.com/MetaMask/metamask-extension/blob/develop/.github/guidelines/LABELING_GUIDELINES.md)).
Not required for external contributors.

## **Pre-merge reviewer checklist**

- [ ] I've manually tested the PR (e.g. pull and build branch, run the
app, test code being changed).
- [ ] I confirm that this PR addresses all acceptance criteria described
in the ticket it closes and includes the necessary testing evidence such
as recordings and or screenshots.
  • Loading branch information
hjetpoluru committed Apr 23, 2024
1 parent 1c31e99 commit e5a0643
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions test/e2e/vault-decryption-chrome.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,13 +50,9 @@ async function getExtensionStorageFilePath(driver) {
*/
async function closePopoverIfPresent(driver) {
const popoverButtonSelector = '[data-testid="popover-close"]';
try {
if (await driver.isElementPresent(popoverButtonSelector)) {
await driver.clickElement(popoverButtonSelector);
}
} catch (_err) {
// No popover
}
const linkNotRightNow = { text: 'Not right now', tag: 'button' };
await driver.clickElementSafe(popoverButtonSelector);
await driver.clickElementSafe(linkNotRightNow);
}

/**
Expand Down

0 comments on commit e5a0643

Please sign in to comment.