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-08-16 06:11:31 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2022-08-16 06:11:31 +0300
commit473d6b24349755c8ade489fdb93d5a5463ccc13f (patch)
tree3e3df2559bf96012ee540eec57ebd5d2a79c6fe8 /spec/frontend/notes/components
parent5074a6923ee1572d5e0590191206e0e4a4849287 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/frontend/notes/components')
-rw-r--r--spec/frontend/notes/components/note_body_spec.js19
-rw-r--r--spec/frontend/notes/components/noteable_note_spec.js14
2 files changed, 14 insertions, 19 deletions
diff --git a/spec/frontend/notes/components/note_body_spec.js b/spec/frontend/notes/components/note_body_spec.js
index 0f765a8da87..f96394d9e86 100644
--- a/spec/frontend/notes/components/note_body_spec.js
+++ b/spec/frontend/notes/components/note_body_spec.js
@@ -7,7 +7,6 @@ import NoteAwardsList from '~/notes/components/note_awards_list.vue';
import NoteForm from '~/notes/components/note_form.vue';
import createStore from '~/notes/stores';
import notes from '~/notes/stores/modules/index';
-import { INTERNAL_NOTE_CLASSES } from '~/notes/constants';
import Suggestions from '~/vue_shared/components/markdown/suggestions.vue';
@@ -59,22 +58,10 @@ describe('issue_note_body component', () => {
expect(wrapper.findComponent(NoteAwardsList).exists()).toBe(true);
});
- it('should not have internal note classes', () => {
- expect(wrapper.findByTestId('note-internal-container').classes()).not.toEqual(
- INTERNAL_NOTE_CLASSES,
- );
- });
-
describe('isInternalNote', () => {
beforeEach(() => {
wrapper = createComponent({ props: { isInternalNote: true } });
});
-
- it('should have internal note classes', () => {
- expect(wrapper.findByTestId('note-internal-container').classes()).toEqual(
- INTERNAL_NOTE_CLASSES,
- );
- });
});
describe('isEditing', () => {
@@ -110,12 +97,6 @@ describe('issue_note_body component', () => {
beforeEach(() => {
wrapper.setProps({ isInternalNote: true });
});
-
- it('should not have internal note classes', () => {
- expect(wrapper.findByTestId('note-internal-container').classes()).not.toEqual(
- INTERNAL_NOTE_CLASSES,
- );
- });
});
});
diff --git a/spec/frontend/notes/components/noteable_note_spec.js b/spec/frontend/notes/components/noteable_note_spec.js
index c2c3643abb0..e049c5bc0c8 100644
--- a/spec/frontend/notes/components/noteable_note_spec.js
+++ b/spec/frontend/notes/components/noteable_note_spec.js
@@ -290,6 +290,20 @@ describe('issue_note', () => {
});
});
+ describe('internal note', () => {
+ it('has internal note class for internal notes', () => {
+ createWrapper({ note: { ...note, confidential: true } });
+
+ expect(wrapper.classes()).toContain('internal-note');
+ });
+
+ it('does not have internal note class for external notes', () => {
+ createWrapper({ note });
+
+ expect(wrapper.classes()).not.toContain('internal-note');
+ });
+ });
+
describe('cancel edit', () => {
beforeEach(() => {
createWrapper();