Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2021-02-18 09:09:43 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2021-02-18 09:09:43 +0300
commit98087a9853200d21ecaf50c075ee4346769c89c6 (patch)
tree6f70b3a7c189c8bf9a4c8eb0bef6472d29a0e7a6 /spec/frontend/notes
parentb288724dd2141b12bb6d5b971b9d7bc9c23a11a7 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/frontend/notes')
-rw-r--r--spec/frontend/notes/components/discussion_actions_spec.js2
-rw-r--r--spec/frontend/notes/components/discussion_reply_placeholder_spec.js14
-rw-r--r--spec/frontend/notes/components/noteable_discussion_spec.js2
3 files changed, 9 insertions, 9 deletions
diff --git a/spec/frontend/notes/components/discussion_actions_spec.js b/spec/frontend/notes/components/discussion_actions_spec.js
index 03e5842bb0f..c6a7d7ead98 100644
--- a/spec/frontend/notes/components/discussion_actions_spec.js
+++ b/spec/frontend/notes/components/discussion_actions_spec.js
@@ -96,7 +96,7 @@ describe('DiscussionActions', () => {
it('emits showReplyForm event when clicking on reply placeholder', () => {
jest.spyOn(wrapper.vm, '$emit');
- wrapper.find(ReplyPlaceholder).find('button').trigger('click');
+ wrapper.find(ReplyPlaceholder).find('textarea').trigger('focus');
expect(wrapper.vm.$emit).toHaveBeenCalledWith('showReplyForm');
});
diff --git a/spec/frontend/notes/components/discussion_reply_placeholder_spec.js b/spec/frontend/notes/components/discussion_reply_placeholder_spec.js
index b7b7ec08867..2a4cd0df0c7 100644
--- a/spec/frontend/notes/components/discussion_reply_placeholder_spec.js
+++ b/spec/frontend/notes/components/discussion_reply_placeholder_spec.js
@@ -1,17 +1,17 @@
import { shallowMount } from '@vue/test-utils';
import ReplyPlaceholder from '~/notes/components/discussion_reply_placeholder.vue';
-const buttonText = 'Test Button Text';
+const placeholderText = 'Test Button Text';
describe('ReplyPlaceholder', () => {
let wrapper;
- const findButton = () => wrapper.find({ ref: 'button' });
+ const findTextarea = () => wrapper.find({ ref: 'textarea' });
beforeEach(() => {
wrapper = shallowMount(ReplyPlaceholder, {
propsData: {
- buttonText,
+ placeholderText,
},
});
});
@@ -20,17 +20,17 @@ describe('ReplyPlaceholder', () => {
wrapper.destroy();
});
- it('emits onClick event on button click', () => {
- findButton().trigger('click');
+ it('emits focus event on button click', () => {
+ findTextarea().trigger('focus');
return wrapper.vm.$nextTick().then(() => {
expect(wrapper.emitted()).toEqual({
- onClick: [[]],
+ focus: [[]],
});
});
});
it('should render reply button', () => {
- expect(findButton().text()).toEqual(buttonText);
+ expect(findTextarea().attributes('placeholder')).toEqual(placeholderText);
});
});
diff --git a/spec/frontend/notes/components/noteable_discussion_spec.js b/spec/frontend/notes/components/noteable_discussion_spec.js
index 87538279c3d..34df39bf1c7 100644
--- a/spec/frontend/notes/components/noteable_discussion_spec.js
+++ b/spec/frontend/notes/components/noteable_discussion_spec.js
@@ -65,7 +65,7 @@ describe('noteable_discussion component', () => {
expect(wrapper.vm.isReplying).toEqual(false);
const replyPlaceholder = wrapper.find(ReplyPlaceholder);
- replyPlaceholder.vm.$emit('onClick');
+ replyPlaceholder.vm.$emit('focus');
await nextTick();
expect(wrapper.vm.isReplying).toEqual(true);