From 77740ae326651ccddccd4cfe65b109dd66ecf41b Mon Sep 17 00:00:00 2001 From: Aahna Ashina <95955389+aahna-ashina@users.noreply.github.com> Date: Fri, 23 Aug 2024 10:49:07 +0700 Subject: [PATCH] test: reset port number for cypress testing (#306) --- README.md | 2 +- ui/README.md | 2 +- ui/cypress.config.ts | 2 +- ui/package.json | 8 ++--- ui/yarn.lock | 72 ++++++++++++++++++++++---------------------- 5 files changed, 43 insertions(+), 43 deletions(-) diff --git a/README.md b/README.md index 0e10ae09..0f64b319 100644 --- a/README.md +++ b/README.md @@ -38,7 +38,7 @@ Start the development server: yarn dev ``` -Once you go to http://localhost:42069, you will see the message "Nation3 uses Sepolia as its preferred network": +Once you go to http://localhost:3000, you will see the message "Nation3 uses Sepolia as its preferred network": > Screenshot 2024-01-25 at 13 09 56 diff --git a/ui/README.md b/ui/README.md index d5395292..ad1b6323 100644 --- a/ui/README.md +++ b/ui/README.md @@ -39,7 +39,7 @@ Start the development server: yarn dev ``` -Then open http://localhost:42069 in a browser. +Then open http://localhost:3000 in a browser. ## Integration Testing diff --git a/ui/cypress.config.ts b/ui/cypress.config.ts index 5c86e65b..1734c951 100644 --- a/ui/cypress.config.ts +++ b/ui/cypress.config.ts @@ -2,7 +2,7 @@ import { defineConfig } from "cypress"; export default defineConfig({ e2e: { - baseUrl: 'http://localhost:42069', + baseUrl: 'http://localhost:3000', supportFile: false } }); diff --git a/ui/package.json b/ui/package.json index c8cb28cf..d827f324 100644 --- a/ui/package.json +++ b/ui/package.json @@ -2,14 +2,14 @@ "name": "citizen-app", "private": true, "scripts": { - "dev": "PORT=42069 next dev", + "dev": "next dev", "build": "next build", "start": "next start", "lint": "next lint", "cypress": "cypress open", "cypress:headless": "cypress run", - "e2e": "start-server-and-test dev http://localhost:42069 cypress", - "e2e:headless": "start-server-and-test dev http://localhost:42069 cypress:headless", + "e2e": "start-server-and-test dev http://localhost:3000 cypress", + "e2e:headless": "start-server-and-test dev http://localhost:3000 cypress:headless", "test": "jest", "test:coverage": "jest --coverage --collectCoverageFrom=./lib/**" }, @@ -37,7 +37,7 @@ "@types/jest": "^28.1.8", "@types/react": "18.0.1", "autoprefixer": "^10.4.0", - "cypress": "^11", + "cypress": "^13.13.3", "eslint": "8.57.0", "eslint-config-next": "13", "eslint-config-prettier": "^9.1.0", diff --git a/ui/yarn.lock b/ui/yarn.lock index e96cfe0c..50871252 100644 --- a/ui/yarn.lock +++ b/ui/yarn.lock @@ -527,9 +527,9 @@ __metadata: languageName: node linkType: hard -"@cypress/request@npm:^2.88.10": - version: 2.88.12 - resolution: "@cypress/request@npm:2.88.12" +"@cypress/request@npm:^3.0.1": + version: 3.0.1 + resolution: "@cypress/request@npm:3.0.1" dependencies: aws-sign2: "npm:~0.7.0" aws4: "npm:^1.8.0" @@ -544,12 +544,12 @@ __metadata: json-stringify-safe: "npm:~5.0.1" mime-types: "npm:~2.1.19" performance-now: "npm:^2.1.0" - qs: "npm:~6.10.3" + qs: "npm:6.10.4" safe-buffer: "npm:^5.1.2" tough-cookie: "npm:^4.1.3" tunnel-agent: "npm:^0.6.0" uuid: "npm:^8.3.2" - checksum: 10c0/815d56db900d63479a7385f1f76d583f1fea6181499ed8abd54aec477423b03202e1155389e0035c3ec29852a0cce39c21629f358b604f604d4653b6d0ce9d52 + checksum: 10c0/8eb92a665e6549e2533f5169431addcaad0307f51a8c7f3b6b169eb79b4d673373784a527590a47b0a2905ad5f601b24ab2d1b31d184243235aba470ffc9c1f7 languageName: node linkType: hard @@ -2652,13 +2652,6 @@ __metadata: languageName: node linkType: hard -"@types/node@npm:^14.14.31": - version: 14.18.63 - resolution: "@types/node@npm:14.18.63" - checksum: 10c0/626a371419a6a0e11ca460b22bb4894abe5d75c303739588bc96267e380aa8b90ba5a87bc552400584f0ac2a84b5c458dadcbcf0dfd2396ebeb765f7a7f95893 - languageName: node - linkType: hard - "@types/node@npm:^20.12.11": version: 20.16.1 resolution: "@types/node@npm:20.16.1" @@ -4240,7 +4233,7 @@ __metadata: languageName: node linkType: hard -"buffer@npm:^5.6.0": +"buffer@npm:^5.7.1": version: 5.7.1 resolution: "buffer@npm:5.7.1" dependencies: @@ -4477,7 +4470,7 @@ __metadata: "@types/react": "npm:18.0.1" "@types/react-dom": "npm:^18.0.4" autoprefixer: "npm:^10.4.0" - cypress: "npm:^11" + cypress: "npm:^13.13.3" daisyui: "npm:^2.13.5" eslint: "npm:8.57.0" eslint-config-next: "npm:13" @@ -4705,10 +4698,10 @@ __metadata: languageName: node linkType: hard -"commander@npm:^5.1.0": - version: 5.1.0 - resolution: "commander@npm:5.1.0" - checksum: 10c0/da9d71dbe4ce039faf1fe9eac3771dca8c11d66963341f62602f7b66e36d2a3f8883407af4f9a37b1db1a55c59c0c1325f186425764c2e963dc1d67aec2a4b6d +"commander@npm:^6.2.1": + version: 6.2.1 + resolution: "commander@npm:6.2.1" + checksum: 10c0/85748abd9d18c8bc88febed58b98f66b7c591d9b5017cad459565761d7b29ca13b7783ea2ee5ce84bf235897333706c4ce29adf1ce15c8252780e7000e2ce9ea languageName: node linkType: hard @@ -4870,28 +4863,27 @@ __metadata: languageName: node linkType: hard -"cypress@npm:^11": - version: 11.2.0 - resolution: "cypress@npm:11.2.0" +"cypress@npm:^13.13.3": + version: 13.13.3 + resolution: "cypress@npm:13.13.3" dependencies: - "@cypress/request": "npm:^2.88.10" + "@cypress/request": "npm:^3.0.1" "@cypress/xvfb": "npm:^1.2.4" - "@types/node": "npm:^14.14.31" "@types/sinonjs__fake-timers": "npm:8.1.1" "@types/sizzle": "npm:^2.3.2" arch: "npm:^2.2.0" blob-util: "npm:^2.0.2" bluebird: "npm:^3.7.2" - buffer: "npm:^5.6.0" + buffer: "npm:^5.7.1" cachedir: "npm:^2.3.0" chalk: "npm:^4.1.0" check-more-types: "npm:^2.24.0" cli-cursor: "npm:^3.1.0" cli-table3: "npm:~0.6.1" - commander: "npm:^5.1.0" + commander: "npm:^6.2.1" common-tags: "npm:^1.8.0" dayjs: "npm:^1.10.4" - debug: "npm:^4.3.2" + debug: "npm:^4.3.4" enquirer: "npm:^2.3.6" eventemitter2: "npm:6.4.7" execa: "npm:4.1.0" @@ -4900,25 +4892,26 @@ __metadata: figures: "npm:^3.2.0" fs-extra: "npm:^9.1.0" getos: "npm:^3.2.1" - is-ci: "npm:^3.0.0" + is-ci: "npm:^3.0.1" is-installed-globally: "npm:~0.4.0" lazy-ass: "npm:^1.6.0" listr2: "npm:^3.8.3" lodash: "npm:^4.17.21" log-symbols: "npm:^4.0.0" - minimist: "npm:^1.2.6" + minimist: "npm:^1.2.8" ospath: "npm:^1.2.2" pretty-bytes: "npm:^5.6.0" + process: "npm:^0.11.10" proxy-from-env: "npm:1.0.0" request-progress: "npm:^3.0.0" - semver: "npm:^7.3.2" + semver: "npm:^7.5.3" supports-color: "npm:^8.1.1" - tmp: "npm:~0.2.1" + tmp: "npm:~0.2.3" untildify: "npm:^4.0.0" yauzl: "npm:^2.10.0" bin: cypress: bin/cypress - checksum: 10c0/f7047cb89660683d972ea91c80f85d2efe9eed61fed9dae4ae03dab1d3a209b51103f30085dc16543fa4eaae9bb8cd234ba111003193375ce94a781a9008bb27 + checksum: 10c0/187fdbe0ca6eedd04a04828971847ef5f3d0e0c2bd74a25a761dd2cc0de1fb84f7e4c1bc4f88e46f753d87748b31eca3ddaae798275546fe1964c8453cbe4a63 languageName: node linkType: hard @@ -7401,7 +7394,7 @@ __metadata: languageName: node linkType: hard -"is-ci@npm:^3.0.0": +"is-ci@npm:^3.0.1": version: 3.0.1 resolution: "is-ci@npm:3.0.1" dependencies: @@ -9134,7 +9127,7 @@ __metadata: languageName: node linkType: hard -"minimist@npm:^1.2.0, minimist@npm:^1.2.5, minimist@npm:^1.2.6, minimist@npm:^1.2.7": +"minimist@npm:^1.2.0, minimist@npm:^1.2.5, minimist@npm:^1.2.6, minimist@npm:^1.2.7, minimist@npm:^1.2.8": version: 1.2.8 resolution: "minimist@npm:1.2.8" checksum: 10c0/19d3fcdca050087b84c2029841a093691a91259a47def2f18222f41e7645a0b7c44ef4b40e88a1e58a40c84d2ef0ee6047c55594d298146d0eb3f6b737c20ce6 @@ -10317,6 +10310,13 @@ __metadata: languageName: node linkType: hard +"process@npm:^0.11.10": + version: 0.11.10 + resolution: "process@npm:0.11.10" + checksum: 10c0/40c3ce4b7e6d4b8c3355479df77aeed46f81b279818ccdc500124e6a5ab882c0cc81ff7ea16384873a95a74c4570b01b120f287abbdd4c877931460eca6084b3 + languageName: node + linkType: hard + "promise-retry@npm:^2.0.1": version: 2.0.1 resolution: "promise-retry@npm:2.0.1" @@ -10448,7 +10448,7 @@ __metadata: languageName: node linkType: hard -"qs@npm:~6.10.3": +"qs@npm:6.10.4": version: 6.10.4 resolution: "qs@npm:6.10.4" dependencies: @@ -11055,7 +11055,7 @@ __metadata: languageName: node linkType: hard -"semver@npm:7.x, semver@npm:^7.3.2, semver@npm:^7.3.4, semver@npm:^7.3.5, semver@npm:^7.3.8, semver@npm:^7.5.3, semver@npm:^7.5.4": +"semver@npm:7.x, semver@npm:^7.3.4, semver@npm:^7.3.5, semver@npm:^7.3.8, semver@npm:^7.5.3, semver@npm:^7.5.4": version: 7.6.3 resolution: "semver@npm:7.6.3" bin: @@ -11964,7 +11964,7 @@ __metadata: languageName: node linkType: hard -"tmp@npm:~0.2.1": +"tmp@npm:~0.2.3": version: 0.2.3 resolution: "tmp@npm:0.2.3" checksum: 10c0/3e809d9c2f46817475b452725c2aaa5d11985cf18d32a7a970ff25b568438e2c076c2e8609224feef3b7923fa9749b74428e3e634f6b8e520c534eef2fd24125