Browse Source

fix linting, and give instructions for current test suite

Trent Larson 4 months ago
parent
commit
01a8814b4e
  1. 28
      README.md
  2. 4
      package.json
  3. 4
      src/views/ClaimView.vue
  4. 5
      src/views/HomeView.vue

28
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

4
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",

4
src/views/ClaimView.vue

@ -150,7 +150,7 @@
<div v-if="libsUtil.isGiveAction(veriClaim)">
<div class="flex columns-3">
<button
class="col-span-1 bg-gradient-to-b from-blue-400 to-blue-700 shadow-[inset_0_-1px_0_0_rgba(0,0,0,0.5)] text-white px-4 py-2 rounded-md"
class="col-span-1 bg-gradient-to-b from-blue-400 to-blue-700 shadow-[inset_0_-1px_0_0_rgba(0,0,0,0.5)] text-white mt-2 px-4 py-2 rounded-md"
v-if="
libsUtil.isGiveRecordTheUserCanConfirm(
isRegistered,
@ -164,7 +164,7 @@
Confirm
<fa icon="circle-check" class="ml-2 text-white cursor-pointer" />
</button>
<h2 v-else class="font-bold uppercase text-xl mt-2 mb-2">Confirmations</h2>
<h2 v-else class="font-bold uppercase text-xl mt-2">Confirmations</h2>
<span class="mt-0.5 px-4 py-2">
<router-link

5
src/views/HomeView.vue

@ -277,10 +277,7 @@
</router-link>
</span>
</div>
<div
v-if="record.image"
class="flex justify-center"
>
<div v-if="record.image" class="flex justify-center">
<a :href="record.image" target="_blank">
<img :src="record.image" class="h-24 mt-2 rounded-xl" />
</a>

Loading…
Cancel
Save