From de9b96eb6dd15e855151cef5a2aee667c9db4f5c Mon Sep 17 00:00:00 2001 From: dshack1 Date: Thu, 30 Oct 2025 14:16:10 +0000 Subject: [PATCH 1/5] docs: updating document to reflect node version required via package.json node >= 18.0.0 --- README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 59842189a..0150cdf4b 100644 --- a/README.md +++ b/README.md @@ -39,17 +39,17 @@ See https://git-scm.com/downloads for instructions. ### Step 2: Install Node.js -_Node.js version 16.x works best for now; later versions have exhibited some strange behaviour with this project. +_Node.js version 18.x works best for now; later versions have exhibited some strange behaviour with this project. If you encounter issues with the server, check your version of Node.js first. This includes CORS related issues when fetching the API._ We recommend using [nvm](https://github.com/nvm-sh/nvm) to install and manage your Node.js instances. More details here: https://www.sitepoint.com/quick-tip-multiple-versions-node-nvm/ 1. Make sure a profile exists for your terminal, run `touch ~/.profile; touch ~/.zshrc` 2. Install nvm: `curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.38.0/install.sh | bash` -3. Install the latest version of Node.js 16: `nvm install 16` -4. Use the installed Node.js: `nvm use 16` +3. Install the latest version of Node.js 18: `nvm install 18` +4. Use the installed Node.js: `nvm use 18` -Alternatively, you can install Node.js directly from https://nodejs.org/dist/latest-v16.x/ +Alternatively, you can install Node.js directly from https://nodejs.org/dist/latest-v18.x/ _On MacOS, you can alleviate the need to run as sudo by using nvm or by [following John Papa's instructions](http://jpapa.me/nomoresudo)._ From ac46f051fc90da719ee9718a5ac6a4964432f655 Mon Sep 17 00:00:00 2001 From: dshack1 Date: Thu, 30 Oct 2025 14:23:07 +0000 Subject: [PATCH 2/5] docs: updating command to install npm with legacy dependencies --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 0150cdf4b..a14eaef07 100644 --- a/README.md +++ b/README.md @@ -84,6 +84,8 @@ REACT_APP_API_ROOT=http://localhost:3000 ``` npm install +*option* +**`npm install --legacy-peer-deps`** ``` ### Step 6: Start the client From 3006ec398bba85ec384267253322a598f436876c Mon Sep 17 00:00:00 2001 From: dshack1 Date: Thu, 30 Oct 2025 15:10:03 +0000 Subject: [PATCH 3/5] docs: updated document with additonal npm install for dependencies --- README.md | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index a14eaef07..e0eebbe0c 100644 --- a/README.md +++ b/README.md @@ -82,12 +82,15 @@ REACT_APP_API_ROOT=http://localhost:3000 ### Step 5: Install npm dependencies +_option_ + ``` npm install -*option* -**`npm install --legacy-peer-deps`** ``` +_For Legacy dependencies run_ - +**`npm install --legacy-peer-deps`** + ### Step 6: Start the client ``` From b1829933c0c8602c5c3fcdc4081fe7cf6e43a30b Mon Sep 17 00:00:00 2001 From: dshack1 Date: Fri, 31 Oct 2025 03:26:32 +0000 Subject: [PATCH 4/5] docs: updated testing documentation --- README.md | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index e0eebbe0c..ce5aa916b 100644 --- a/README.md +++ b/README.md @@ -232,10 +232,26 @@ We follow the React/Jest convention for writng tests. All test file are located Please ensure that at least all the _model_ unit tests under `./src/model/` pass. -To run tests: +Some components test are also located under _tests_ under `./src/components/tests` + +Contains mock data and utilities used across tests `./src/testMocks` + +``` +Current Test Stats + +Total Tests: 108 +Framework: Jest + +Environment: React 18.x / Babel-Jest +``` + +To run tests: `npm test` +To run a single test: +`npm test -- xxx.test.js` + ### Cypress Make your own `/cypress/fixtures/login.json` file containing the actual credentials in order to run the cypress tests. From 4710c8e7be1e561008a09da42418e004d602db27 Mon Sep 17 00:00:00 2001 From: dshack1 Date: Sat, 1 Nov 2025 22:01:21 +0000 Subject: [PATCH 5/5] refactor: updated and improve link jump to web map --- src/components/Verify.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/components/Verify.js b/src/components/Verify.js index 101bc2941..b3ef30d2d 100644 --- a/src/components/Verify.js +++ b/src/components/Verify.js @@ -238,7 +238,7 @@ const Verify = (props) => { e.stopPropagation(); e.preventDefault(); log.debug('click on capture pin:%d', captureId); - const url = `${process.env.REACT_APP_WEBMAP_DOMAIN}/?treeid=${captureId}`; + const url = `${process.env.REACT_APP_WEBMAP_DOMAIN}/trees/${captureId}`; window.open(url, '_blank').opener = null; } @@ -246,7 +246,7 @@ const Verify = (props) => { e.stopPropagation(); e.preventDefault(); log.debug('click on grower:%d', growerId); - const url = `${process.env.REACT_APP_WEBMAP_DOMAIN}/?userid=${growerId}`; + const url = `${process.env.REACT_APP_WEBMAP_DOMAIN}/planters/${growerId}`; window.open(url, '_blank').opener = null; } @@ -480,7 +480,8 @@ const Verify = (props) => { handleCapturePinClick(e, capture.id)} aria-label={`Capture location`} @@ -490,7 +491,8 @@ const Verify = (props) => { handleGrowerMapClick(e, capture.planterId)