From e280820e9c17adca80e198b714678ec8545e8ef6 Mon Sep 17 00:00:00 2001 From: Thomas Citharel Date: Mon, 11 Oct 2021 18:29:01 +0200 Subject: [PATCH] Fix front-end tests Signed-off-by: Thomas Citharel --- js/src/components/Post/PostElementItem.vue | 1 + js/src/views/Posts/Post.vue | 1 + js/tests/unit/specs/boot/routes.spec.ts | 4 ++++ .../components/Comment/__snapshots__/CommentTree.spec.ts.snap | 4 ++-- .../unit/specs/components/__snapshots__/navbar.spec.ts.snap | 2 +- 5 files changed, 9 insertions(+), 3 deletions(-) diff --git a/js/src/components/Post/PostElementItem.vue b/js/src/components/Post/PostElementItem.vue index 602713d2..045ffbda 100644 --- a/js/src/components/Post/PostElementItem.vue +++ b/js/src/components/Post/PostElementItem.vue @@ -47,6 +47,7 @@ {{ $options.filters.formatDateTimeString( new Date(post.insertedAt), + undefined, false ) }} diff --git a/js/src/views/Posts/Post.vue b/js/src/views/Posts/Post.vue index 671475fc..e315c76d 100644 --- a/js/src/views/Posts/Post.vue +++ b/js/src/views/Posts/Post.vue @@ -29,6 +29,7 @@ :title=" $options.filters.formatDateTimeString( post.updatedAt, + undefined, true, 'short' ) diff --git a/js/tests/unit/specs/boot/routes.spec.ts b/js/tests/unit/specs/boot/routes.spec.ts index 14d771ff..483938a3 100644 --- a/js/tests/unit/specs/boot/routes.spec.ts +++ b/js/tests/unit/specs/boot/routes.spec.ts @@ -4,11 +4,15 @@ import App from "@/App.vue"; import VueRouter from "vue-router"; import Buefy from "buefy"; import flushPromises from "flush-promises"; +import VueAnnouncer from "@vue-a11y/announcer"; +import VueSkipTo from "@vue-a11y/skip-to"; const localVue = createLocalVue(); config.mocks.$t = (key: string): string => key; localVue.use(VueRouter); localVue.use(Buefy); +localVue.use(VueAnnouncer); +localVue.use(VueSkipTo); describe("routing", () => { test("Homepage", async () => { diff --git a/js/tests/unit/specs/components/Comment/__snapshots__/CommentTree.spec.ts.snap b/js/tests/unit/specs/components/Comment/__snapshots__/CommentTree.spec.ts.snap index c2d67bc8..2ab6af2f 100644 --- a/js/tests/unit/specs/components/Comment/__snapshots__/CommentTree.spec.ts.snap +++ b/js/tests/unit/specs/components/Comment/__snapshots__/CommentTree.spec.ts.snap @@ -12,7 +12,7 @@ exports[`CommentTree renders a comment tree with comments 1`] = `

- +

@@ -54,7 +54,7 @@ exports[`CommentTree renders an empty comment tree 1`] = `

- +

diff --git a/js/tests/unit/specs/components/__snapshots__/navbar.spec.ts.snap b/js/tests/unit/specs/components/__snapshots__/navbar.spec.ts.snap index 4a1495db..e863ec22 100644 --- a/js/tests/unit/specs/components/__snapshots__/navbar.spec.ts.snap +++ b/js/tests/unit/specs/components/__snapshots__/navbar.spec.ts.snap @@ -1,3 +1,3 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`App component renders a Vue component 1`] = ` `; +exports[`App component renders a Vue component 1`] = ` `;