From 01a8814b4ed6bcd49df0d36510a9800173351d57 Mon Sep 17 00:00:00 2001 From: Trent Larson Date: Sat, 10 Aug 2024 13:37:31 -0600 Subject: [PATCH] fix linting, and give instructions for current test suite --- README.md | 28 ++++++++++++++++++---------- package.json | 4 +++- src/views/ClaimView.vue | 4 ++-- src/views/HomeView.vue | 5 +---- 4 files changed, 24 insertions(+), 17 deletions(-) diff --git a/README.md b/README.md index 92ba190..c4350bc 100644 --- a/README.md +++ b/README.md @@ -71,10 +71,7 @@ npm run build ### Automated -Using the global test Endorser (ledger) server: -`npx playwright test` - -Using the locally running Endorser server: +Use the locally running Endorser server: * Clone and set up https://github.com/trentlarson/endorser-ch and run the following in that directory: ``` @@ -82,7 +79,23 @@ test/test.sh NODE_ENV=test-local npm run dev ``` -Alternatively, you can run the following which starts with the bare minimum test data: +* Now run the local tests: +``` +npm run test-all +``` + +Note that a test will sometimes fail and rerunning may succeed (and repeat if a different test fails). + + + + +It's possible to use the global test Endorser (ledger) server (but currently the tests don't all succeed): +`npx playwright test` + + + + +It's possible to run with a minimal set of data: the following starts with the bare minimum of test data (but currently the tests don't all succeed): ``` rm ../endorser-ch-test-local.sqlite3 NODE_ENV=test-local npm run flyway migrate @@ -91,11 +104,6 @@ NODE_ENV=test-local npm run dev ``` -* Now run the local tests: -``` -npx playwright test -c playwright.config-local.ts -``` - ### Register new user on test server On the test server, User #0 has rights to register others, so you can start diff --git a/package.json b/package.json index 6db0d6b..a769e55 100644 --- a/package.json +++ b/package.json @@ -7,7 +7,9 @@ "build": "VITE_GIT_HASH=`git log -1 --pretty=format:%h` vite build", "lint": "eslint --ext .js,.ts,.vue --ignore-path .gitignore src", "lint-fix": "eslint --ext .js,.ts,.vue --ignore-path .gitignore --fix src", - "prebuild": "eslint --ext .js,.ts,.vue --ignore-path .gitignore src && node sw_combine.js" + "prebuild": "eslint --ext .js,.ts,.vue --ignore-path .gitignore src && node sw_combine.js", + "test-local": "npx playwright test -c playwright.config-local.ts --trace on", + "test-all": "npm run build && npx playwright test -c playwright.config-local.ts --trace on" }, "dependencies": { "@dicebear/collection": "^5.4.1", diff --git a/src/views/ClaimView.vue b/src/views/ClaimView.vue index 5df9fc4..1d6ff28 100644 --- a/src/views/ClaimView.vue +++ b/src/views/ClaimView.vue @@ -150,7 +150,7 @@
-

Confirmations

+

Confirmations

-
+