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>2022-04-05 15:10:23 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2022-04-05 15:10:23 +0300
commit7e964f54ed3dd08ed528481843ba1972684335dc (patch)
tree633ea7d7473ecea5385f1c98d3a67103e0b5fcb3 /spec/frontend/notes/components
parentb5e513dbefdc7d27ddfd800c81b80e55f086f3f5 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/frontend/notes/components')
-rw-r--r--spec/frontend/notes/components/note_form_spec.js9
-rw-r--r--spec/frontend/notes/components/noteable_discussion_spec.js1
-rw-r--r--spec/frontend/notes/components/notes_app_spec.js8
3 files changed, 11 insertions, 7 deletions
diff --git a/spec/frontend/notes/components/note_form_spec.js b/spec/frontend/notes/components/note_form_spec.js
index 3e80b24f128..b709141f4ac 100644
--- a/spec/frontend/notes/components/note_form_spec.js
+++ b/spec/frontend/notes/components/note_form_spec.js
@@ -81,7 +81,6 @@ describe('issue_note_form component', () => {
it('should show conflict message if note changes outside the component', async () => {
wrapper.setProps({
...props,
- isEditing: true,
noteBody: 'Foo',
});
@@ -111,6 +110,12 @@ describe('issue_note_form component', () => {
);
});
+ it('should set data-supports-quick-actions to enable autocomplete', () => {
+ const textarea = wrapper.find('textarea');
+
+ expect(textarea.attributes('data-supports-quick-actions')).toBe('true');
+ });
+
it('should link to markdown docs', () => {
const { markdownDocsPath } = notesDataMock;
const markdownField = wrapper.find(MarkdownField);
@@ -171,7 +176,6 @@ describe('issue_note_form component', () => {
it('should be possible to cancel', async () => {
wrapper.setProps({
...props,
- isEditing: true,
});
await nextTick();
@@ -185,7 +189,6 @@ describe('issue_note_form component', () => {
it('should be possible to update the note', async () => {
wrapper.setProps({
...props,
- isEditing: true,
});
await nextTick();
diff --git a/spec/frontend/notes/components/noteable_discussion_spec.js b/spec/frontend/notes/components/noteable_discussion_spec.js
index 727ef02dcbb..c46d3bbe5b2 100644
--- a/spec/frontend/notes/components/noteable_discussion_spec.js
+++ b/spec/frontend/notes/components/noteable_discussion_spec.js
@@ -86,7 +86,6 @@ describe('noteable_discussion component', () => {
const noteFormProps = noteForm.props();
expect(noteFormProps.discussion).toBe(discussionMock);
- expect(noteFormProps.isEditing).toBe(false);
expect(noteFormProps.line).toBe(null);
expect(noteFormProps.saveButtonTitle).toBe('Comment');
expect(noteFormProps.autosaveKey).toBe(`Note/Issue/${discussionMock.id}/Reply`);
diff --git a/spec/frontend/notes/components/notes_app_spec.js b/spec/frontend/notes/components/notes_app_spec.js
index 312af853d68..56b19a43d7b 100644
--- a/spec/frontend/notes/components/notes_app_spec.js
+++ b/spec/frontend/notes/components/notes_app_spec.js
@@ -298,16 +298,18 @@ describe('note_app', () => {
await nextTick();
expect(wrapper.find(`.edit-note a[href="${markdownDocsPath}"]`).text().trim()).toEqual(
- 'Markdown is supported',
+ 'Markdown',
);
});
- it('should not render quick actions docs url', async () => {
+ it('should render quick actions docs url', async () => {
wrapper.find('.js-note-edit').trigger('click');
const { quickActionsDocsPath } = mockData.notesDataMock;
await nextTick();
- expect(wrapper.find(`.edit-note a[href="${quickActionsDocsPath}"]`).exists()).toBe(false);
+ expect(wrapper.find(`.edit-note a[href="${quickActionsDocsPath}"]`).text().trim()).toEqual(
+ 'quick actions',
+ );
});
});