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/admin/abuse_report/components/abuse_report_notes_spec.js')
-rw-r--r--spec/frontend/admin/abuse_report/components/abuse_report_notes_spec.js12
1 files changed, 12 insertions, 0 deletions
diff --git a/spec/frontend/admin/abuse_report/components/abuse_report_notes_spec.js b/spec/frontend/admin/abuse_report/components/abuse_report_notes_spec.js
index 166c735ffbd..a1993e2bde3 100644
--- a/spec/frontend/admin/abuse_report/components/abuse_report_notes_spec.js
+++ b/spec/frontend/admin/abuse_report/components/abuse_report_notes_spec.js
@@ -8,6 +8,7 @@ import SkeletonLoadingContainer from '~/vue_shared/components/notes/skeleton_not
import abuseReportNotesQuery from '~/admin/abuse_report/graphql/notes/abuse_report_notes.query.graphql';
import AbuseReportNotes from '~/admin/abuse_report/components/abuse_report_notes.vue';
import AbuseReportDiscussion from '~/admin/abuse_report/components/notes/abuse_report_discussion.vue';
+import AbuseReportAddNote from '~/admin/abuse_report/components/notes/abuse_report_add_note.vue';
import { mockAbuseReport, mockNotesByIdResponse } from '../mock_data';
@@ -24,6 +25,7 @@ describe('Abuse Report Notes', () => {
const findSkeletonLoaders = () => wrapper.findAllComponents(SkeletonLoadingContainer);
const findAbuseReportDiscussions = () => wrapper.findAllComponents(AbuseReportDiscussion);
+ const findAbuseReportAddNote = () => wrapper.findComponent(AbuseReportAddNote);
const createComponent = ({
queryHandler = notesQueryHandler,
@@ -78,6 +80,16 @@ describe('Abuse Report Notes', () => {
discussion: discussions[1].notes.nodes,
});
});
+
+ it('should show the comment form', () => {
+ expect(findAbuseReportAddNote().exists()).toBe(true);
+
+ expect(findAbuseReportAddNote().props()).toMatchObject({
+ abuseReportId: mockAbuseReportId,
+ discussionId: '',
+ isNewDiscussion: true,
+ });
+ });
});
describe('When there is an error fetching the notes', () => {