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:
Diffstat (limited to 'spec/frontend/notes/components/discussion_reply_placeholder_spec.js')
-rw-r--r--spec/frontend/notes/components/discussion_reply_placeholder_spec.js14
1 files changed, 7 insertions, 7 deletions
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);
});
});