summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2022-02-23 21:15:56 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2022-02-23 21:15:56 +0000
commit67770e6591eccb40cd9d6436370be5126c77544a (patch)
tree9422dcb456ad8918d863ab7498ea0d256bb3a7f5 /spec
parent94299354d10c1c4758883eb92df56255f32dcbe9 (diff)
downloadgitlab-ce-67770e6591eccb40cd9d6436370be5126c77544a.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec')
-rw-r--r--spec/frontend/vue_shared/components/markdown/field_spec.js18
1 files changed, 18 insertions, 0 deletions
diff --git a/spec/frontend/vue_shared/components/markdown/field_spec.js b/spec/frontend/vue_shared/components/markdown/field_spec.js
index cf8933129ac..0c5ccb34eef 100644
--- a/spec/frontend/vue_shared/components/markdown/field_spec.js
+++ b/spec/frontend/vue_shared/components/markdown/field_spec.js
@@ -268,6 +268,24 @@ describe('Markdown field component', () => {
'You are about to add 11 people to the discussion. They will all receive a notification.',
);
});
+
+ it('removes warning when all mention is removed while endpoint is loading', async () => {
+ axiosMock.onPost(markdownPreviewPath).reply(200, { references: { users } });
+ jest.spyOn(axios, 'post');
+
+ subject.setProps({ textareaValue: 'hello @all' });
+
+ await nextTick();
+
+ subject.setProps({ textareaValue: 'hello @allan' });
+
+ await axios.waitFor(markdownPreviewPath);
+
+ expect(axios.post).toHaveBeenCalled();
+ expect(subject.text()).not.toContain(
+ 'You are about to add 11 people to the discussion. They will all receive a notification.',
+ );
+ });
});
});
});