diff options
author | Adriel Santiago <asantiago@gitlab.com> | 2019-05-28 09:41:34 +0300 |
---|---|---|
committer | Kushal Pandya <kushalspandya@gmail.com> | 2019-05-28 09:41:34 +0300 |
commit | e0c5deaf1b06787f7af9f376975925335dab20f7 (patch) | |
tree | 3b26b524d7e9e2cc5010026aba99919219e34634 /spec/frontend | |
parent | 4dbf10164abf648fe0d68209976eedee501b7fa5 (diff) |
Add expand/collapse button
Add ability to expand/collapse operation settings
Diffstat (limited to 'spec/frontend')
-rw-r--r-- | spec/frontend/operation_settings/components/external_dashboard_spec.js | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/spec/frontend/operation_settings/components/external_dashboard_spec.js b/spec/frontend/operation_settings/components/external_dashboard_spec.js index de1dd219fe0..4d35d35965c 100644 --- a/spec/frontend/operation_settings/components/external_dashboard_spec.js +++ b/spec/frontend/operation_settings/components/external_dashboard_spec.js @@ -2,6 +2,9 @@ import { shallowMount } from '@vue/test-utils'; import { GlButton, GlLink, GlFormGroup, GlFormInput } from '@gitlab/ui'; import ExternalDashboard from '~/operation_settings/components/external_dashboard.vue'; import { TEST_HOST } from 'helpers/test_constants'; +import initSettingsPanels from '~/settings_panels'; + +jest.mock('~/settings_panels'); describe('operation settings external dashboard component', () => { let wrapper; @@ -21,6 +24,18 @@ describe('operation settings external dashboard component', () => { expect(wrapper.find('.js-section-header').text()).toBe('External Dashboard'); }); + describe('expand/collapse button', () => { + it('is properly instantiated as a settings panel', () => { + expect(initSettingsPanels).toHaveBeenCalled(); + }); + + it('defaults to collapsed state', () => { + const button = wrapper.find(GlButton); + + expect(button.text()).toBe('Expand'); + }); + }); + describe('sub-header', () => { let subHeader; |