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>2023-06-07 15:09:00 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2023-06-07 15:09:00 +0300
commitba27dbddc7dbc42f2cc8d84e815a9ea19f87a81d (patch)
treee71fba864897fa78be7f0c40ded23d0f719abf84 /spec/frontend/notes
parent708815aefead73a61473c1a611aea169ab16a358 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/frontend/notes')
-rw-r--r--spec/frontend/notes/components/noteable_discussion_spec.js21
1 files changed, 19 insertions, 2 deletions
diff --git a/spec/frontend/notes/components/noteable_discussion_spec.js b/spec/frontend/notes/components/noteable_discussion_spec.js
index 0ed7069a98d..fa3a1979a98 100644
--- a/spec/frontend/notes/components/noteable_discussion_spec.js
+++ b/spec/frontend/notes/components/noteable_discussion_spec.js
@@ -49,14 +49,14 @@ describe('noteable_discussion component', () => {
});
};
- const createComponent = ({ storeMock = createStore() } = {}) => {
+ const createComponent = ({ storeMock = createStore(), discussion = discussionMock } = {}) => {
store = storeMock;
store.dispatch('setNoteableData', noteableDataMock);
store.dispatch('setNotesData', notesDataMock);
wrapper = mountExtended(NoteableDiscussion, {
store,
- propsData: { discussion: discussionMock },
+ propsData: { discussion },
});
};
@@ -160,6 +160,23 @@ describe('noteable_discussion component', () => {
false,
);
});
+
+ it('should add `internal-note` class when the discussion is internal', async () => {
+ const softCopyInternalNotes = [...discussionMock.notes];
+ const mockInternalNotes = softCopyInternalNotes.splice(0, 2);
+ mockInternalNotes[0].internal = true;
+
+ const mockDiscussion = {
+ ...discussionMock,
+ notes: [...mockInternalNotes],
+ };
+ wrapper.setProps({ discussion: mockDiscussion });
+ await nextTick();
+
+ const replyWrapper = wrapper.find('[data-testid="reply-wrapper"]');
+ expect(replyWrapper.exists()).toBe(true);
+ expect(replyWrapper.classes('internal-note')).toBe(true);
+ });
});
describe('for resolved thread', () => {