From d9cc9f58426a8f735f0a65fc63378ddd27fd52b8 Mon Sep 17 00:00:00 2001 From: Thomas Citharel Date: Fri, 4 Dec 2020 15:07:27 +0100 Subject: [PATCH] Improve the message when loading comments below event Signed-off-by: Thomas Citharel --- js/src/components/Comment/CommentTree.vue | 11 +++++++---- .../unit/specs/components/Comment/CommentTree.spec.ts | 2 +- .../Comment/__snapshots__/CommentTree.spec.ts.snap | 10 +++------- 3 files changed, 11 insertions(+), 12 deletions(-) diff --git a/js/src/components/Comment/CommentTree.vue b/js/src/components/Comment/CommentTree.vue index 592e23cd9..10c5bbc44 100644 --- a/js/src/components/Comment/CommentTree.vue +++ b/js/src/components/Comment/CommentTree.vue @@ -39,10 +39,13 @@ {{ $t("The organiser has chosen to close comments.") }} - -

- {{ $t("Loading…") }} -

+

+ {{ $t("Loading comments…") }} +

+ { expect(wrapper.findComponent({ name: "b-notification" }).text()).toBe( "The organiser has chosen to close comments." ); - expect(wrapper.find(".loading").text()).toBe("Loading…"); + expect(wrapper.find(".loading").text()).toBe("Loading comments…"); expect(wrapper.html()).toMatchSnapshot(); }); 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 4ea79739c..48a66f29d 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 @@ -3,12 +3,9 @@ exports[`CommentTree renders a comment tree 1`] = `
The organiser has chosen to close comments. - -

- Loading… -

- -
+

+ Loading comments… +

`; @@ -16,7 +13,6 @@ exports[`CommentTree renders a comment tree 2`] = `
The organiser has chosen to close comments. -