diff options
Diffstat (limited to 'spec/frontend/notes/components/comment_form_spec.js')
-rw-r--r-- | spec/frontend/notes/components/comment_form_spec.js | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/spec/frontend/notes/components/comment_form_spec.js b/spec/frontend/notes/components/comment_form_spec.js index fb42e4d1d84..ba5d4d27e55 100644 --- a/spec/frontend/notes/components/comment_form_spec.js +++ b/spec/frontend/notes/components/comment_form_spec.js @@ -582,6 +582,26 @@ describe('issue_comment_form component', () => { expect(checkbox.element.checked).toBe(false); }); + it.each` + noteableType | rendered | message + ${'Issue'} | ${true} | ${'render'} + ${'Epic'} | ${true} | ${'render'} + ${'MergeRequest'} | ${false} | ${'not render'} + `( + 'should $message checkbox when noteableType is $noteableType', + ({ noteableType, rendered }) => { + mountComponent({ + mountFunction: mount, + noteableType, + initialData: { note: 'internal note' }, + noteableData: { ...notableDataMockCanUpdateIssuable, noteableType }, + features, + }); + + expect(findConfidentialNoteCheckbox().exists()).toBe(rendered); + }, + ); + describe.each` shouldCheckboxBeChecked ${true} |