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

Testing artifacts vault #25405

Closed
wants to merge 6 commits into from
Closed
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
10 changes: 5 additions & 5 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -202,11 +202,6 @@ workflows:
requires:
- prep-build-test-mmi
- test-e2e-chrome-vault-decryption:
filters:
branches:
only:
- develop
- /^Version-v(\d+)[.](\d+)[.](\d+)/
requires:
- prep-build
- test-unit-mocha:
Expand Down Expand Up @@ -1191,6 +1186,11 @@ jobs:
yarn test:e2e:single test/e2e/vault-decryption-chrome.spec.js --browser chrome --retries 1
fi
no_output_timeout: 5m
- store_artifacts:
path: test-artifacts
destination: test-artifacts
- store_test_results:
path: test/test-results/e2e

test-e2e-firefox-flask:
executor: node-browsers-medium-plus
Expand Down
15 changes: 7 additions & 8 deletions privacy-snapshot.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"api.segment.io",
"api.web3modal.com",
"arbitrum-mainnet.infura.io",
"authentication.api.cx.metamask.io",
"bafkreifvhjdf6ve4jfv6qytqtux5nd4nwnelioeiqx5x2ez5yrgrzk7ypi.ipfs.dweb.link",
"bafybeidxfmwycgzcp4v2togflpqh2gnibuexjy4m4qqwxp7nh3jx5zlh4y.ipfs.dweb.link",
"cdn.segment.com",
Expand All @@ -21,12 +22,14 @@
"gas.api.cx.metamask.io",
"github.com",
"goerli.infura.io",
"lattice.gridplus.io",
"localhost:8000",
"localhost:8545",
"mainnet.infura.io",
"metamask.github.io",
"min-api.cryptocompare.com",
"nft.api.cx.metamask.io",
"oidc.api.cx.metamask.io",
"phishing-detection.api.cx.metamask.io",
"portfolio.metamask.io",
"price.api.cx.metamask.io",
Expand All @@ -35,6 +38,7 @@
"registry.npmjs.org",
"responsive-rpc.test",
"sentry.io",
"sepolia.infura.io",
"snaps.metamask.io",
"start.metamask.io",
"static.cx.metamask.io",
Expand All @@ -43,12 +47,7 @@
"token.api.cx.metamask.io",
"tokens.api.cx.metamask.io",
"tx-sentinel-ethereum-mainnet.api.cx.metamask.io",
"unresponsive-rpc.url",
"www.4byte.directory",
"lattice.gridplus.io",
"unresponsive-rpc.test",
"authentication.api.cx.metamask.io",
"oidc.api.cx.metamask.io",
"price.api.cx.metamask.io",
"token.api.cx.metamask.io"
]
"unresponsive-rpc.url",
"www.4byte.directory"
]
1 change: 1 addition & 0 deletions test/e2e/helpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -639,6 +639,7 @@ const tapAndHoldToRevealSRP = async (driver) => {
tag: 'span',
},
3000,
true,
);
};

Expand Down
36 changes: 26 additions & 10 deletions test/e2e/webdriver/driver.js
Original file line number Diff line number Diff line change
Expand Up @@ -636,21 +636,37 @@ class Driver {

/**
* Simulates holding the mouse button down on the given web element.
* Optionally, hold the mouse further until the target element disappears from the DOM.
*
* @param {string | object} rawLocator - Element locator
* @param {number} ms - number of milliseconds to hold the mouse button down
* @param {boolean} waitToDisappear - Flag indicating whether to wait for the element to disappear.
* @returns {Promise<void>} promise resolving after mouse down completed
*/
async holdMouseDownOnElement(rawLocator, ms) {
const locator = this.buildLocator(rawLocator);
const element = await this.findClickableElement(locator);
await this.driver
.actions()
.move({ origin: element, x: 1, y: 1 })
.press()
.pause(ms)
.release()
.perform();

async holdMouseDownOnElement(rawLocator, ms, waitToDisappear = false) {
try {
const locator = this.buildLocator(rawLocator);
const element = await this.findClickableElement(locator);
await this.driver
.actions()
.move({ origin: element, x: 1, y: 1 })
.press()
.perform();

// Pause for the specified duration
await this.driver.actions().pause(ms).perform();

if (waitToDisappear) {
// Wait until the element disappears
await this.driver.wait(until.elementIsNotPresent(locator));
}

// Release the mouse button
await this.driver.actions().release().perform();
} catch (error) {
throw error;
}
}

/**
Expand Down
Loading