Commit 272c3922 authored by Eulyeon Ko's avatar Eulyeon Ko

Pass noteableDisplayName for noteableType prop

Add changelog entry

Update spec to check for 'confidential issue' str

Apply the suggested patch
parent a6303996
......@@ -8,16 +8,10 @@ function buildDocsLinkStart(path) {
return `<a href="${escape(path)}" target="_blank" rel="noopener noreferrer">`;
}
const NoteableType = {
Issue: 'issue',
Epic: 'epic',
MergeRequest: 'merge_request',
};
const NoteableTypeText = {
[NoteableType.Issue]: __('issue'),
[NoteableType.Epic]: __('epic'),
[NoteableType.MergeRequest]: __('merge request'),
Issue: __('issue'),
Epic: __('epic'),
MergeRequest: __('merge request'),
};
export default {
......@@ -39,7 +33,8 @@ export default {
noteableType: {
type: String,
required: false,
default: NoteableType.Issue,
// eslint-disable-next-line @gitlab/require-i18n-strings
default: 'Issue',
},
lockedNoteableDocsPath: {
type: String,
......
---
title: Fix confidential warning not showing the issuable type
merge_request: 34988
author:
type: fixed
......@@ -4,4 +4,4 @@
#js-vue-notes{ data: { notes_data: notes_data(@epic).to_json,
noteable_data: EpicSerializer.new(current_user: current_user).represent(@epic).to_json,
current_user_data: UserSerializer.new.represent(current_user, { only_path: true }, CurrentUserEntity).to_json,
noteable_type: 'epic' } }
noteable_type: 'Epic' } }
......@@ -60,9 +60,12 @@ describe('Issue Warning Component', () => {
});
});
it('renders information about confidential issue', () => {
it('renders information about confidential issue', async () => {
expect(findConfidentialBlock().exists()).toBe(true);
expect(findConfidentialBlock().element).toMatchSnapshot();
await wrapper.vm.$nextTick();
expect(findConfidentialBlock(wrapper).text()).toContain('This is a confidential issue.');
});
it('renders warning icon', () => {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment