From 827a82bb4fbe6bebc07e6817e00fd7cf3d5c494c Mon Sep 17 00:00:00 2001 From: Lucas Terriel Date: Tue, 19 Mar 2024 17:52:58 +0100 Subject: [PATCH] fix PersonDataTimeline : render correct ISO date order + add person timeline tests (dates order, events number by date) --- .github/workflows/node.js.yml | 4 +- package.json | 3 +- src/components/PersonDataTimeline.vue | 54 ++++- tests/fixtures/eventsResponse.json | 228 ++++++++++++++++++ tests/fixtures/store.js | 56 +++++ tests/unit/PersonDataTimeline.spec.js | 13 - .../components/PersonDataTimeline.spec.js | 52 ++++ 7 files changed, 389 insertions(+), 21 deletions(-) create mode 100644 tests/fixtures/eventsResponse.json create mode 100644 tests/fixtures/store.js delete mode 100644 tests/unit/PersonDataTimeline.spec.js create mode 100644 tests/unit/components/PersonDataTimeline.spec.js diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index 2028b3c..e3a13a3 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -1,7 +1,7 @@ # This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node # For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-nodejs -name: Node.js CI +name: e-NDP Vue Node.js CI on: push: @@ -27,4 +27,4 @@ jobs: node-version: ${{ matrix.node-version }} cache: 'npm' - run: npm install --force - - run: npm run test + - run: npm run test::unit diff --git a/package.json b/package.json index b6c338d..cc1ae21 100644 --- a/package.json +++ b/package.json @@ -6,8 +6,9 @@ "serve": "vue-cli-service serve --port 9091", "build": "vue-cli-service build", "lint": "vue-cli-service lint", - "test": "jest --no-cache --silent" + "test::unit": "jest --no-cache --verbose" }, + "dependencies": { "@vuepic/vue-datepicker": "^7.4.1", "axios": "^1.6.5", diff --git a/src/components/PersonDataTimeline.vue b/src/components/PersonDataTimeline.vue index b593bcd..60526bc 100644 --- a/src/components/PersonDataTimeline.vue +++ b/src/components/PersonDataTimeline.vue @@ -7,7 +7,8 @@
-
+
{{ formatDate(group.date) }}