mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-11-22 09:57:02 +01:00
Move nft e2e tests to main e2e test job (#18055)
* NFTs: Remove feature flag for release * Update security tab jest test * Fix broken test * Update snapshot * Update test * Fix test * remove nft build * move tests to main e2e job * remove nft scripts * remove test for nft build --------- Co-authored-by: David Walsh <davidwalsh83@gmail.com>
This commit is contained in:
parent
bfefa35811
commit
7215fc25a4
@ -32,10 +32,8 @@
|
||||
"test:unit:mocha": "node ./test/run-unit-tests.js --mocha",
|
||||
"test:e2e:chrome": "SELENIUM_BROWSER=chrome node test/e2e/run-all.js",
|
||||
"test:e2e:chrome:snaps": "SELENIUM_BROWSER=chrome node test/e2e/run-all.js --snaps",
|
||||
"test:e2e:chrome:nft": "SELENIUM_BROWSER=chrome node test/e2e/run-all.js --nft",
|
||||
"test:e2e:firefox": "SELENIUM_BROWSER=firefox node test/e2e/run-all.js",
|
||||
"test:e2e:firefox:snaps": "SELENIUM_BROWSER=firefox node test/e2e/run-all.js --snaps",
|
||||
"test:e2e:firefox:nft": "SELENIUM_BROWSER=firefox node test/e2e/run-all.js --nft",
|
||||
"test:e2e:single": "node test/e2e/run-e2e-test.js",
|
||||
"test:e2e:report": "node ./test/e2e/e2e-process-report.js && jrm ./test/test-results/e2e.xml \"./test/test-results/e2e/*.xml\"",
|
||||
"test:coverage:mocha": "node ./test/run-unit-tests.js --mocha --coverage",
|
||||
|
@ -1,33 +0,0 @@
|
||||
const { strict: assert } = require('assert');
|
||||
const { convertToHexValue, withFixtures } = require('../helpers');
|
||||
const FixtureBuilder = require('../fixture-builder');
|
||||
|
||||
describe('NFT Feature Flag', function () {
|
||||
const ganacheOptions = {
|
||||
accounts: [
|
||||
{
|
||||
secretKey:
|
||||
'0x7C9529A67102755B7E6102D6D950AC5D5863C98713805CEC576B945B15B71EAC',
|
||||
balance: convertToHexValue(25000000000000000000),
|
||||
},
|
||||
],
|
||||
};
|
||||
it('should display the NFT tab', async function () {
|
||||
await withFixtures(
|
||||
{
|
||||
fixtures: new FixtureBuilder().build(),
|
||||
ganacheOptions,
|
||||
title: this.test.title,
|
||||
},
|
||||
async ({ driver }) => {
|
||||
await driver.navigate();
|
||||
await driver.fill('#password', 'correct horse battery staple');
|
||||
await driver.press('#password', driver.Key.ENTER);
|
||||
const nftTab = await driver.findElement(
|
||||
'[data-testid="home__nfts-tab"]',
|
||||
);
|
||||
assert.equal(await nftTab.isDisplayed(), true);
|
||||
},
|
||||
);
|
||||
});
|
||||
});
|
@ -50,10 +50,6 @@ async function main() {
|
||||
description: `run mv3 specific e2e tests`,
|
||||
type: 'boolean',
|
||||
})
|
||||
.option('nft', {
|
||||
description: `run nft specific e2e tests`,
|
||||
type: 'boolean',
|
||||
})
|
||||
.option('retries', {
|
||||
description:
|
||||
'Set how many times the test should be retried upon failure.',
|
||||
@ -63,21 +59,19 @@ async function main() {
|
||||
.strict()
|
||||
.help('help');
|
||||
|
||||
const { browser, debug, retries, snaps, mv3, nft } = argv;
|
||||
const { browser, debug, retries, snaps, mv3 } = argv;
|
||||
|
||||
let testPaths;
|
||||
|
||||
if (snaps) {
|
||||
const testDir = path.join(__dirname, 'snaps');
|
||||
testPaths = await getTestPathsForTestDir(testDir);
|
||||
} else if (nft) {
|
||||
const testDir = path.join(__dirname, 'nft');
|
||||
testPaths = await getTestPathsForTestDir(testDir);
|
||||
} else {
|
||||
const testDir = path.join(__dirname, 'tests');
|
||||
testPaths = [
|
||||
...(await getTestPathsForTestDir(testDir)),
|
||||
...(await getTestPathsForTestDir(path.join(__dirname, 'swaps'))),
|
||||
...(await getTestPathsForTestDir(path.join(__dirname, 'nft'))),
|
||||
path.join(__dirname, 'metamask-ui.spec.js'),
|
||||
];
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user