From d1e225ab1976cc38a009c1986b204111fda410cc Mon Sep 17 00:00:00 2001 From: Fraz Arshad Date: Thu, 7 Mar 2024 11:40:47 +0500 Subject: [PATCH] feat: included settings to setup npm --- .npmignore | 9 +++++++++ package.json | 16 ++++++++-------- synpress.config.js | 8 +------- 3 files changed, 18 insertions(+), 15 deletions(-) create mode 100644 .npmignore diff --git a/.npmignore b/.npmignore new file mode 100644 index 000000000..c4acaa9fd --- /dev/null +++ b/.npmignore @@ -0,0 +1,9 @@ +.github +.env +.dockerignore +docker +docs +downloads +images +tests +tools diff --git a/package.json b/package.json index 886a46ea2..785741dd0 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { - "name": "@synthetixio/synpress", - "version": "3.7.2-beta.9", + "name": "@agoric/synpress", + "version": "3.7.2-dev", "description": "Synpress is e2e testing framework based around Cypress.io & playwright with included MetaMask support. Test your dapps with ease.", "keywords": [ "Synpress", @@ -9,17 +9,17 @@ "testing", "e2e" ], - "homepage": "https://github.com/synthetixio/synpress#readme", + "homepage": "https://github.com/agoric-labs/synpress#readme", "bugs": { - "url": "https://github.com/synthetixio/synpress/issues" + "url": "https://github.com/agoric-labs/synpress/issues" }, "repository": { "type": "git", - "url": "git+https://github.com/synthetixio/synpress.git" + "url": "git+https://github.com/agoric-labs/synpress.git" }, "license": "MIT", "author": { - "name": "Synthetix" + "name": "agoric-labs" }, "type": "commonjs", "main": "launcher.js", @@ -43,7 +43,7 @@ "start:contract": "cd tools/contract && pnpm start", "start:ui": "cd tools/ui && pnpm dev", "start:json-server": "json-server tools/json-server-db.json --port 3004", - "synpress:run:metamask": "EXTENSION=metamask SKIP_EXTENSION_SETUP=true SYNPRESS_LOCAL_TEST=true node synpress.js run --configFile=synpress.config.js", + "synpress:run:metamask": "CYPRESS_SPEC_PATTERN=tests/e2e/specs/metamask/** EXTENSION=metamask SKIP_EXTENSION_SETUP=true SYNPRESS_LOCAL_TEST=true node synpress.js run --configFile=synpress.config.js", "test:e2e:metamask": "start-server-and-test 'pnpm start:server' http-get://localhost:3000 'pnpm synpress:run:metamask'", "test:e2e:anvil": "start-server-and-test 'turbo start:server' http-get://localhost:3000 'CYPRESS_USE_ANVIL=true pnpm synpress:run'", "test:e2e:headless": "start-server-and-test 'turbo start:server' http-get://localhost:3000 'pnpm synpress:run --headless'", @@ -51,7 +51,7 @@ "test:e2e:ci": "start-server-and-test 'VITE_LOCAL_ENV=agoric_chain pnpm start:ui' http-get://localhost:3000 'pnpm start:json-server' http-get://localhost:3004 'pnpm synpress:run --record --group'", "test:e2e:ci:anvil": "start-server-and-test 'turbo start:server' http-get://localhost:3000 'CYPRESS_USE_ANVIL=true pnpm synpress:run --record --group'", "test:e2e:ci:cypress-action": "CYPRESS_USE_ANVIL=true pnpm synpress:run", - "synpress:run:keplr": "EXTENSION=keplr SKIP_EXTENSION_SETUP=true SYNPRESS_LOCAL_TEST=true node synpress.js run --configFile=synpress.config.js", + "synpress:run:keplr": "CYPRESS_SPEC_PATTERN=tests/e2e/specs/keplr/** EXTENSION=keplr SKIP_EXTENSION_SETUP=true SYNPRESS_LOCAL_TEST=true node synpress.js run --configFile=synpress.config.js", "test:e2e:keplr": "start-server-and-test 'pnpm start:ui' http-get://localhost:3000 'pnpm start:json-server' http-get://localhost:3004 'pnpm synpress:run:keplr'" }, "dependencies": { diff --git a/synpress.config.js b/synpress.config.js index a28755ea3..36f6e8e8d 100644 --- a/synpress.config.js +++ b/synpress.config.js @@ -11,12 +11,6 @@ const fixturesFolder = `${synpressPath}/fixtures`; log(`Detected synpress fixtures path is: ${fixturesFolder}`); const supportFile = 'tests/e2e/support.js'; - -const specPattern = { - metamask: 'tests/e2e/specs/metamask/**/*.{js,jsx,ts,tsx}', - keplr : 'tests/e2e/specs/keplr/**/*.{js,jsx,ts,tsx}' -} - module.exports = defineConfig({ userAgent: 'synpress', retries: { @@ -39,7 +33,7 @@ module.exports = defineConfig({ testIsolation: false, setupNodeEvents, baseUrl: 'http://localhost:3000', - specPattern: specPattern[process.env.EXTENSION], + specPattern: 'tests/e2e/specs/**/*spec.{js,jsx,ts,tsx}', supportFile, }, component: {