diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-03-30 18:08:07 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-03-30 18:08:07 +0000 |
commit | 2c72daf2f1744f2b8c8c6674c266907e9ef55558 (patch) | |
tree | e489b6e87557d3f6d8a94f2e7d4d47e633d646b5 /spec/frontend | |
parent | 4e9acbfba3682c552b3de707c535e6257ef41054 (diff) | |
download | gitlab-ce-2c72daf2f1744f2b8c8c6674c266907e9ef55558.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/frontend')
-rw-r--r-- | spec/frontend/maintenance_mode_settings/components/app_spec.js | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/spec/frontend/maintenance_mode_settings/components/app_spec.js b/spec/frontend/maintenance_mode_settings/components/app_spec.js new file mode 100644 index 00000000000..a67bc63cfe1 --- /dev/null +++ b/spec/frontend/maintenance_mode_settings/components/app_spec.js @@ -0,0 +1,42 @@ +import { shallowMount } from '@vue/test-utils'; +import MaintenanceModeSettingsApp from '~/maintenance_mode_settings/components/app.vue'; +import { GlToggle, GlFormTextarea, GlButton } from '@gitlab/ui'; + +describe('MaintenanceModeSettingsApp', () => { + let wrapper; + + const createComponent = () => { + wrapper = shallowMount(MaintenanceModeSettingsApp); + }; + + afterEach(() => { + wrapper.destroy(); + }); + + const findMaintenanceModeSettingsContainer = () => wrapper.find('article'); + const findGlToggle = () => wrapper.find(GlToggle); + const findGlFormTextarea = () => wrapper.find(GlFormTextarea); + const findGlButton = () => wrapper.find(GlButton); + + describe('template', () => { + beforeEach(() => { + createComponent(); + }); + + it('renders the Maintenance Mode Settings container', () => { + expect(findMaintenanceModeSettingsContainer().exists()).toBe(true); + }); + + it('renders the GlToggle', () => { + expect(findGlToggle().exists()).toBe(true); + }); + + it('renders the GlFormTextarea', () => { + expect(findGlFormTextarea().exists()).toBe(true); + }); + + it('renders the GlButton', () => { + expect(findGlButton().exists()).toBe(true); + }); + }); +}); |