From 7215fc25a44fd1957b3ba749b945bbdb514a3b42 Mon Sep 17 00:00:00 2001 From: Peter <53189696+PeterYinusa@users.noreply.github.com> Date: Tue, 14 Mar 2023 15:21:24 +0000 Subject: [PATCH] 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 --- package.json | 2 -- test/e2e/nft/nft.spec.js | 33 --------------------------------- test/e2e/run-all.js | 10 ++-------- 3 files changed, 2 insertions(+), 43 deletions(-) delete mode 100644 test/e2e/nft/nft.spec.js diff --git a/package.json b/package.json index 4b0180420..40c0dd36a 100644 --- a/package.json +++ b/package.json @@ -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", diff --git a/test/e2e/nft/nft.spec.js b/test/e2e/nft/nft.spec.js deleted file mode 100644 index f1d5a2774..000000000 --- a/test/e2e/nft/nft.spec.js +++ /dev/null @@ -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); - }, - ); - }); -}); diff --git a/test/e2e/run-all.js b/test/e2e/run-all.js index fc2fb7fad..af5849b37 100644 --- a/test/e2e/run-all.js +++ b/test/e2e/run-all.js @@ -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'), ];