43 lines
1.2 KiB
JavaScript
43 lines
1.2 KiB
JavaScript
|
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);
|
||
|
});
|
||
|
});
|
||
|
});
|