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-06-06 15:08:32 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2022-06-06 15:08:32 +0300
commit2e31a394c5857fdb845811685ca7fc79a2fb7540 (patch)
treee0bfee190f52dcd69131ffc02b3790b86440bba3 /spec/frontend/notes/components
parent900a0a5a4af50678df889f693ac4d226d2cf4f99 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/frontend/notes/components')
-rw-r--r--spec/frontend/notes/components/comment_field_layout_spec.js4
-rw-r--r--spec/frontend/notes/components/comment_form_spec.js24
-rw-r--r--spec/frontend/notes/components/note_body_spec.js28
-rw-r--r--spec/frontend/notes/components/note_header_spec.js16
4 files changed, 36 insertions, 36 deletions
diff --git a/spec/frontend/notes/components/comment_field_layout_spec.js b/spec/frontend/notes/components/comment_field_layout_spec.js
index 90c989540b9..d69c2c4adfa 100644
--- a/spec/frontend/notes/components/comment_field_layout_spec.js
+++ b/spec/frontend/notes/components/comment_field_layout_spec.js
@@ -135,14 +135,14 @@ describe('Comment Field Layout Component', () => {
});
});
- describe('issue has email participants, but note is confidential', () => {
+ describe('issue has email participants, but note is internal', () => {
it('does not show EmailParticipantsWarning', () => {
createWrapper({
noteableData: {
...noteableDataMock,
issue_email_participants: [{ email: 'someone@gitlab.com' }],
},
- noteIsConfidential: true,
+ isInternalNote: true,
});
expect(findEmailParticipantsWarning().exists()).toBe(false);
diff --git a/spec/frontend/notes/components/comment_form_spec.js b/spec/frontend/notes/components/comment_form_spec.js
index df41aad2981..116016ecae2 100644
--- a/spec/frontend/notes/components/comment_form_spec.js
+++ b/spec/frontend/notes/components/comment_form_spec.js
@@ -32,7 +32,7 @@ describe('issue_comment_form component', () => {
const findTextArea = () => wrapper.findByTestId('comment-field');
const findAddToReviewButton = () => wrapper.findByTestId('add-to-review-button');
const findAddCommentNowButton = () => wrapper.findByTestId('add-comment-now-button');
- const findConfidentialNoteCheckbox = () => wrapper.findByTestId('confidential-note-checkbox');
+ const findConfidentialNoteCheckbox = () => wrapper.findByTestId('internal-note-checkbox');
const findCommentTypeDropdown = () => wrapper.findComponent(CommentTypeDropdown);
const findCommentButton = () => findCommentTypeDropdown().find('button');
const findErrorAlerts = () => wrapper.findAllComponents(GlAlert).wrappers;
@@ -249,15 +249,15 @@ describe('issue_comment_form component', () => {
describe('textarea', () => {
describe('general', () => {
it.each`
- noteType | confidential | placeholder
- ${'comment'} | ${false} | ${'Write a comment or drag your files here…'}
- ${'internal note'} | ${true} | ${'Write an internal note or drag your files here…'}
+ noteType | noteIsInternal | placeholder
+ ${'comment'} | ${false} | ${'Write a comment or drag your files here…'}
+ ${'internal note'} | ${true} | ${'Write an internal note or drag your files here…'}
`(
'should render textarea with placeholder for $noteType',
- ({ confidential, placeholder }) => {
+ ({ noteIsInternal, placeholder }) => {
mountComponent({
mountFunction: mount,
- initialData: { noteIsConfidential: confidential },
+ initialData: { noteIsInternal },
});
expect(findTextArea().attributes('placeholder')).toBe(placeholder);
@@ -389,14 +389,14 @@ describe('issue_comment_form component', () => {
});
it.each`
- confidential | buttonText
- ${false} | ${'Comment'}
- ${true} | ${'Add internal note'}
- `('renders comment button with text "$buttonText"', ({ confidential, buttonText }) => {
+ noteIsInternal | buttonText
+ ${false} | ${'Comment'}
+ ${true} | ${'Add internal note'}
+ `('renders comment button with text "$buttonText"', ({ noteIsInternal, buttonText }) => {
mountComponent({
mountFunction: mount,
- noteableData: createNotableDataMock({ confidential }),
- initialData: { noteIsConfidential: confidential },
+ noteableData: createNotableDataMock({ confidential: noteIsInternal }),
+ initialData: { noteIsInternal },
});
expect(findCommentButton().text()).toBe(buttonText);
diff --git a/spec/frontend/notes/components/note_body_spec.js b/spec/frontend/notes/components/note_body_spec.js
index 0481dd12c68..0f765a8da87 100644
--- a/spec/frontend/notes/components/note_body_spec.js
+++ b/spec/frontend/notes/components/note_body_spec.js
@@ -7,7 +7,7 @@ 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 { CONFIDENTIAL_CLASSES } from '~/notes/constants';
+import { INTERNAL_NOTE_CLASSES } from '~/notes/constants';
import Suggestions from '~/vue_shared/components/markdown/suggestions.vue';
@@ -59,20 +59,20 @@ describe('issue_note_body component', () => {
expect(wrapper.findComponent(NoteAwardsList).exists()).toBe(true);
});
- it('should not have confidential classes', () => {
- expect(wrapper.findByTestId('note-confidential-container').classes()).not.toEqual(
- CONFIDENTIAL_CLASSES,
+ it('should not have internal note classes', () => {
+ expect(wrapper.findByTestId('note-internal-container').classes()).not.toEqual(
+ INTERNAL_NOTE_CLASSES,
);
});
- describe('isConfidential', () => {
+ describe('isInternalNote', () => {
beforeEach(() => {
- wrapper = createComponent({ props: { isConfidential: true } });
+ wrapper = createComponent({ props: { isInternalNote: true } });
});
- it('should have confidential classes', () => {
- expect(wrapper.findByTestId('note-confidential-container').classes()).toEqual(
- CONFIDENTIAL_CLASSES,
+ it('should have internal note classes', () => {
+ expect(wrapper.findByTestId('note-internal-container').classes()).toEqual(
+ INTERNAL_NOTE_CLASSES,
);
});
});
@@ -106,14 +106,14 @@ describe('issue_note_body component', () => {
expect(wrapper.vm.autosave.key).toEqual(autosaveKey);
});
- describe('isConfidential', () => {
+ describe('isInternalNote', () => {
beforeEach(() => {
- wrapper.setProps({ isConfidential: true });
+ wrapper.setProps({ isInternalNote: true });
});
- it('should not have confidential classes', () => {
- expect(wrapper.findByTestId('note-confidential-container').classes()).not.toEqual(
- CONFIDENTIAL_CLASSES,
+ 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/note_header_spec.js b/spec/frontend/notes/components/note_header_spec.js
index 310a470aa18..ad2cf1c5a35 100644
--- a/spec/frontend/notes/components/note_header_spec.js
+++ b/spec/frontend/notes/components/note_header_spec.js
@@ -21,7 +21,7 @@ describe('NoteHeader component', () => {
const findActionText = () => wrapper.find({ ref: 'actionText' });
const findTimestampLink = () => wrapper.find({ ref: 'noteTimestampLink' });
const findTimestamp = () => wrapper.find({ ref: 'noteTimestamp' });
- const findConfidentialIndicator = () => wrapper.findByTestId('internalNoteIndicator');
+ const findInternalNoteIndicator = () => wrapper.findByTestId('internalNoteIndicator');
const findSpinner = () => wrapper.find({ ref: 'spinner' });
const findAuthorStatus = () => wrapper.find({ ref: 'authorStatus' });
@@ -283,20 +283,20 @@ describe('NoteHeader component', () => {
});
});
- describe('with confidentiality indicator', () => {
+ describe('with internal note badge', () => {
it.each`
status | condition
${true} | ${'shows'}
${false} | ${'hides'}
- `('$condition icon indicator when isConfidential is $status', ({ status }) => {
- createComponent({ isConfidential: status });
- expect(findConfidentialIndicator().exists()).toBe(status);
+ `('$condition badge when isInternalNote is $status', ({ status }) => {
+ createComponent({ isInternalNote: status });
+ expect(findInternalNoteIndicator().exists()).toBe(status);
});
- it('shows confidential indicator tooltip for project context', () => {
- createComponent({ isConfidential: true, noteableType: 'issue' });
+ it('shows internal note badge tooltip for project context', () => {
+ createComponent({ isInternalNote: true, noteableType: 'issue' });
- expect(findConfidentialIndicator().attributes('title')).toBe(
+ expect(findInternalNoteIndicator().attributes('title')).toBe(
'This internal note will always remain confidential',
);
});