From b09fc3196c155e594a705e8c463ae005aa63ba35 Mon Sep 17 00:00:00 2001 From: Tero Elonen Date: Fri, 11 Oct 2024 11:24:45 +0300 Subject: [PATCH 1/4] UHF-10588: Update documentation a bit --- .../helsinki_benefit_amount_estimate/tests/README.md | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/js/calculator/helsinki_benefit_amount_estimate/tests/README.md b/src/js/calculator/helsinki_benefit_amount_estimate/tests/README.md index 195461ee1..301306861 100644 --- a/src/js/calculator/helsinki_benefit_amount_estimate/tests/README.md +++ b/src/js/calculator/helsinki_benefit_amount_estimate/tests/README.md @@ -38,4 +38,14 @@ Run tests line-by-line: npm run test:debug ``` ---- \ No newline at end of file +--- + +## To run manual tests on local + +* Start a local server on **drupal-hdbt/**, for instance `python -m http.server 3001` +* Open http://localhost:3001/src/js/calculator/helsinki_benefit_amount_estimate/helsinki-benefit-test.html on your browser. + +## To run automatic browser tests +This requires test dependencies to be installed + +`cd src/js/calculator/helsinki_benefit_amount_estimate/tests && npm run test` From 33b3c3e9252ee12a66f54e094fac72260bafc981 Mon Sep 17 00:00:00 2001 From: Tero Elonen Date: Fri, 11 Oct 2024 13:56:33 +0300 Subject: [PATCH 2/4] UHF-10588: Changed the server used to run on npx http-server instead of python --- .../calculator/helsinki_benefit_amount_estimate/tests/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/js/calculator/helsinki_benefit_amount_estimate/tests/README.md b/src/js/calculator/helsinki_benefit_amount_estimate/tests/README.md index 301306861..087ed9495 100644 --- a/src/js/calculator/helsinki_benefit_amount_estimate/tests/README.md +++ b/src/js/calculator/helsinki_benefit_amount_estimate/tests/README.md @@ -42,7 +42,7 @@ npm run test:debug ## To run manual tests on local -* Start a local server on **drupal-hdbt/**, for instance `python -m http.server 3001` +* Start a local server on **drupal-hdbt/**, for instance `npx http-server -p 3001` * Open http://localhost:3001/src/js/calculator/helsinki_benefit_amount_estimate/helsinki-benefit-test.html on your browser. ## To run automatic browser tests From 68c261ecb042b4a5badc7bc35d591f0a766af2c6 Mon Sep 17 00:00:00 2001 From: Tero Elonen Date: Fri, 11 Oct 2024 13:58:22 +0300 Subject: [PATCH 3/4] UHF-10588: Add nvmrc for the tests as well --- src/js/calculator/helsinki_benefit_amount_estimate/tests/.nvmrc | 1 + 1 file changed, 1 insertion(+) create mode 100644 src/js/calculator/helsinki_benefit_amount_estimate/tests/.nvmrc diff --git a/src/js/calculator/helsinki_benefit_amount_estimate/tests/.nvmrc b/src/js/calculator/helsinki_benefit_amount_estimate/tests/.nvmrc new file mode 100644 index 000000000..209e3ef4b --- /dev/null +++ b/src/js/calculator/helsinki_benefit_amount_estimate/tests/.nvmrc @@ -0,0 +1 @@ +20 From ec4cc4c478cd51c493aaeeb8f3bfdbaf1e9a6089 Mon Sep 17 00:00:00 2001 From: Tero Elonen Date: Fri, 11 Oct 2024 14:00:37 +0300 Subject: [PATCH 4/4] UHF-10588: Adjust documentation a bit more --- .../helsinki_benefit_amount_estimate/tests/README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/js/calculator/helsinki_benefit_amount_estimate/tests/README.md b/src/js/calculator/helsinki_benefit_amount_estimate/tests/README.md index 087ed9495..92eeaf6a9 100644 --- a/src/js/calculator/helsinki_benefit_amount_estimate/tests/README.md +++ b/src/js/calculator/helsinki_benefit_amount_estimate/tests/README.md @@ -4,13 +4,13 @@ Needed: -* node installed, tested to be working with at least v18 +* node installed * optionally, a display and a OS with GUI for headed tests To install playwright and it's dependencies: ``` -npm install +nvm use && npm install npm run test:install ```