diff options
Diffstat (limited to 'spec/frontend/admin/broadcast_messages/components/message_form_spec.js')
-rw-r--r-- | spec/frontend/admin/broadcast_messages/components/message_form_spec.js | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/spec/frontend/admin/broadcast_messages/components/message_form_spec.js b/spec/frontend/admin/broadcast_messages/components/message_form_spec.js index ad5f4f6c3c1..dca77e67cac 100644 --- a/spec/frontend/admin/broadcast_messages/components/message_form_spec.js +++ b/spec/frontend/admin/broadcast_messages/components/message_form_spec.js @@ -36,6 +36,7 @@ describe('MessageForm', () => { const findSubmitButton = () => wrapper.findComponent('[data-testid=submit-button]'); const findCancelButton = () => wrapper.findComponent('[data-testid=cancel-button]'); const findForm = () => wrapper.findComponent(GlForm); + const findShowInCli = () => wrapper.findComponent('[data-testid=show-in-cli-checkbox]'); function createComponent({ broadcastMessage = {} } = {}) { wrapper = mount(MessageForm, { @@ -99,6 +100,18 @@ describe('MessageForm', () => { }); }); + describe('showInCli checkbox', () => { + it('renders for Banners', () => { + createComponent({ broadcastMessage: { broadcastType: TYPE_BANNER } }); + expect(findShowInCli().exists()).toBe(true); + }); + + it('does not render for Notifications', () => { + createComponent({ broadcastMessage: { broadcastType: TYPE_NOTIFICATION } }); + expect(findShowInCli().exists()).toBe(false); + }); + }); + describe('target roles checkboxes', () => { it('renders target roles', () => { createComponent(); |