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 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..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 ``` @@ -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 `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 +This requires test dependencies to be installed + +`cd src/js/calculator/helsinki_benefit_amount_estimate/tests && npm run test`