mirror of
https://github.com/tenrok/vue-cron-editor-bootstrap.git
synced 2026-06-08 17:32:24 +03:00
25 lines
859 B
TypeScript
25 lines
859 B
TypeScript
import { shallowMount } from "@vue/test-utils";
|
|
import VueCronEditorBootstrap from "../../src/components/VueCronEditorBootstrap.vue";
|
|
|
|
function getMountedComponent(Component: any, propsData: any) {
|
|
return shallowMount(Component, {
|
|
propsData
|
|
});
|
|
}
|
|
|
|
describe("isAdvancedVisible prop", () => {
|
|
it("renders advanced tab when isAdvancedVisible is true", () => {
|
|
let component = getMountedComponent(VueCronEditorBootstrap, {
|
|
isAdvancedTabVisible: true
|
|
});
|
|
expect(component.find(".advanced-tab").exists()).toBe(true);
|
|
});
|
|
|
|
it("does not render advanced tab when isAdvancedVisible is false", () => {
|
|
let component = getMountedComponent(VueCronEditorBootstrap, {
|
|
isAdvancedTabVisible: false
|
|
});
|
|
expect(component.find(".advanced-tab").exists()).toBe(false);
|
|
});
|
|
});
|