Fix front-end tests

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
Thomas Citharel 2021-10-11 18:29:01 +02:00
parent e606090f17
commit e280820e9c
No known key found for this signature in database
GPG Key ID: A061B9DDE0CA0773
5 changed files with 9 additions and 3 deletions

View File

@ -47,6 +47,7 @@
<small class="has-text-grey-dark">{{
$options.filters.formatDateTimeString(
new Date(post.insertedAt),
undefined,
false
)
}}</small>

View File

@ -29,6 +29,7 @@
:title="
$options.filters.formatDateTimeString(
post.updatedAt,
undefined,
true,
'short'
)

View File

@ -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 () => {

View File

@ -12,7 +12,7 @@ exports[`CommentTree renders a comment tree with comments 1`] = `
<div class="field">
<div class="field">
<p class="control">
<editor-stub mode="comment" value=""></editor-stub>
<editor-stub mode="comment" aria-label="Comment body" value=""></editor-stub>
</p>
<!---->
</div>
@ -54,7 +54,7 @@ exports[`CommentTree renders an empty comment tree 1`] = `
<div class="field">
<div class="field">
<p class="control">
<editor-stub mode="comment" value=""></editor-stub>
<editor-stub mode="comment" aria-label="Comment body" value=""></editor-stub>
</p>
<!---->
</div>

View File

@ -1,3 +1,3 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`App component renders a Vue component 1`] = `<b-navbar-stub type="is-secondary" wrapperclass="container" closeonclick="true" mobileburger="true"><template></template> <template></template> <template></template></b-navbar-stub>`;
exports[`App component renders a Vue component 1`] = `<b-navbar-stub type="is-secondary" wrapperclass="container" closeonclick="true" mobileburger="true" id="navbar"><template></template> <template></template> <template></template></b-navbar-stub>`;