summaryrefslogtreecommitdiff
path: root/spec/frontend/operation_settings
diff options
context:
space:
mode:
Diffstat (limited to 'spec/frontend/operation_settings')
-rw-r--r--spec/frontend/operation_settings/components/external_dashboard_spec.js15
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;