File tree Expand file tree Collapse file tree 38 files changed +669
-14
lines changed Expand file tree Collapse file tree 38 files changed +669
-14
lines changed Original file line number Diff line number Diff line change 1+ import { mount } from 'vue-test-utils'
2+ import Aside from "../Aside/Aside" ;
3+
4+ describe ( "Aside.vue" , ( ) => {
5+ // Inspect the raw component options
6+ it ( 'has isFixed method' , ( ) => {
7+ expect ( typeof Aside . methods . isFixed ) . toBe ( 'function' )
8+ } )
9+ it ( 'has isOffCanvas method' , ( ) => {
10+ expect ( typeof Aside . methods . isOffCanvas ) . toBe ( 'function' )
11+ } )
12+ it ( 'renders correctly' , ( ) => {
13+ const wrapper = mount ( Aside )
14+ expect ( wrapper . element ) . toMatchSnapshot ( )
15+ expect ( wrapper . is ( 'aside' ) ) . toBe ( true )
16+ expect ( wrapper . classes ( ) ) . toContain ( 'aside-menu' )
17+ expect ( wrapper . element . textContent ) . toEqual ( 'Aside' )
18+ } )
19+ } ) ;
Original file line number Diff line number Diff line change 1+ import { mount } from "vue-test-utils" ;
2+ import AsideToggler from "../Aside/AsideToggler" ;
3+
4+ describe ( "AsideToggler.vue" , ( ) => {
5+ // Inspect the raw component options
6+ it ( 'has toggle method' , ( ) => {
7+ expect ( typeof AsideToggler . methods . toggle ) . toBe ( 'function' )
8+ } )
9+ it ( 'has asideToggle method' , ( ) => {
10+ expect ( typeof AsideToggler . methods . asideToggle ) . toBe ( 'function' )
11+ } )
12+ it ( 'renders correctly' , ( ) => {
13+ const wrapper = mount ( AsideToggler )
14+ expect ( wrapper . element ) . toMatchSnapshot ( )
15+ expect ( wrapper . is ( 'button' ) ) . toBe ( true )
16+ expect ( wrapper . classes ( ) ) . toContain ( 'navbar-toggler' )
17+ } )
18+ } ) ;
Original file line number Diff line number Diff line change 1+ import { mount } from "vue-test-utils" ;
2+ import Callout from "../Callout/Callout" ;
3+
4+ describe ( "Callout.vue" , ( ) => {
5+ // Inspect the raw component options
6+ it ( "should have default props" , ( ) => {
7+ const wrapper = mount ( Callout , {
8+ propsData : {
9+ variant : ''
10+ }
11+ } )
12+ expect ( wrapper . props ( ) . variant ) . toBe ( '' )
13+ } ) ;
14+ it ( 'has classList computed property' , ( ) => {
15+ expect ( typeof Callout . computed . classList ) . toBe ( 'function' )
16+ } )
17+ it ( 'has calloutVariant computed property' , ( ) => {
18+ expect ( typeof Callout . computed . calloutVariant ) . toBe ( 'function' )
19+ } )
20+ it ( 'renders correctly' , ( ) => {
21+ const wrapper = mount ( Callout )
22+ expect ( wrapper . element ) . toMatchSnapshot ( )
23+ expect ( wrapper . element . textContent ) . toEqual ( 'Callout' )
24+ expect ( wrapper . classes ( ) ) . toContain ( 'callout' )
25+ } )
26+ } ) ;
Original file line number Diff line number Diff line change 1+ import { mount } from "vue-test-utils" ;
2+ import Footer from "../Footer/Footer" ;
3+
4+ describe ( "Footer.vue" , ( ) => {
5+ // Inspect the raw component options
6+ it ( 'has isFixed method' , ( ) => {
7+ expect ( typeof Footer . methods . isFixed ) . toBe ( 'function' )
8+ } )
9+ it ( 'renders correctly' , ( ) => {
10+ const wrapper = mount ( Footer )
11+ expect ( wrapper . element ) . toMatchSnapshot ( )
12+ expect ( wrapper . element . textContent ) . toEqual ( 'Footer' )
13+ expect ( wrapper . classes ( ) ) . toContain ( 'app-footer' )
14+ } )
15+ } ) ;
Original file line number Diff line number Diff line change 1+ import { mount } from "vue-test-utils" ;
2+ import Header from "../Header/Header" ;
3+
4+ describe ( "Header.vue" , ( ) => {
5+ // Inspect the raw component options
6+ it ( 'has isFixed method' , ( ) => {
7+ expect ( typeof Header . methods . isFixed ) . toBe ( 'function' )
8+ } )
9+ it ( 'renders correctly' , ( ) => {
10+ const wrapper = mount ( Header )
11+ expect ( wrapper . element ) . toMatchSnapshot ( )
12+ expect ( wrapper . element . textContent ) . toEqual ( 'Header' )
13+ expect ( wrapper . classes ( ) ) . toContain ( 'app-header' )
14+ expect ( wrapper . classes ( ) ) . toContain ( 'navbar' )
15+ } )
16+ } ) ;
Original file line number Diff line number Diff line change 1+ import { mount } from 'vue-test-utils'
2+ import HeaderDropdown from '../Header/HeaderDropdown' ;
3+
4+ describe ( "HeaderDropdown.vue" , ( ) => {
5+ // Inspect the raw component options
6+ it ( "should have default props" , ( ) => {
7+ const wrapper = mount ( HeaderDropdown , {
8+ propsData : {
9+ right : false ,
10+ noCaret : false
11+ }
12+ } )
13+ expect ( wrapper . props ( ) . right ) . toBe ( false )
14+ expect ( wrapper . props ( ) . noCaret ) . toBe ( false )
15+ } ) ;
16+ it ( 'renders correctly' , ( ) => {
17+ const wrapper = mount ( HeaderDropdown )
18+ expect ( wrapper . element ) . toMatchSnapshot ( )
19+ expect ( wrapper . find ( 'span' ) . text ( ) ) . toBe ( 'dropdown' )
20+ expect ( wrapper . find ( 'span' ) . classes ( ) ) . toContain ( 'text-center' )
21+ } )
22+ } ) ;
Original file line number Diff line number Diff line change 1+ import { mount } from 'vue-test-utils'
2+ import Sidebar from "../Sidebar/Sidebar" ;
3+
4+ describe ( "Sidebar.vue" , ( ) => {
5+ // Inspect the raw component options
6+ it ( "should have default props" , ( ) => {
7+ const wrapper = mount ( Sidebar , {
8+ propsData : {
9+ fixed : false ,
10+ }
11+ } )
12+ expect ( wrapper . props ( ) . fixed ) . toBe ( false )
13+ } ) ;
14+ it ( 'has isFixed method' , ( ) => {
15+ expect ( typeof Sidebar . methods . isFixed ) . toBe ( 'function' )
16+ } )
17+ it ( 'renders correctly' , ( ) => {
18+ const wrapper = mount ( Sidebar )
19+ expect ( wrapper . element ) . toMatchSnapshot ( )
20+ expect ( wrapper . text ( ) ) . toBe ( 'Sidebar' )
21+ expect ( wrapper . classes ( ) ) . toContain ( 'sidebar' )
22+ } )
23+ } ) ;
Original file line number Diff line number Diff line change 1+ import { mount } from 'vue-test-utils'
2+ import SidebarFooter from "../Sidebar/SidebarFooter" ;
3+
4+ describe ( "SidebarFooter.vue" , ( ) => {
5+ // Inspect the raw component options
6+ it ( 'has hasSlotDefault computed property' , ( ) => {
7+ expect ( typeof SidebarFooter . computed . hasSlotDefault ) . toBe ( 'function' )
8+ } )
9+ it ( 'renders correctly' , ( ) => {
10+ const wrapper = mount ( SidebarFooter , { slots : { default : 'test' } } )
11+ expect ( wrapper . element ) . toMatchSnapshot ( )
12+ expect ( wrapper . classes ( ) ) . toContain ( 'sidebar-footer' )
13+ } )
14+ } ) ;
Original file line number Diff line number Diff line change 1+ import { mount } from 'vue-test-utils'
2+ import SidebarForm from "../Sidebar/SidebarForm" ;
3+
4+ describe ( "SidebarForm.vue" , ( ) => {
5+ // Inspect the raw component options
6+ it ( 'has hasSlotDefault computed property' , ( ) => {
7+ expect ( typeof SidebarForm . computed . hasSlotDefault ) . toBe ( 'function' )
8+ } )
9+ it ( 'renders correctly' , ( ) => {
10+ const wrapper = mount ( SidebarForm , { slots : { default : 'test' } } )
11+ expect ( wrapper . element ) . toMatchSnapshot ( )
12+ expect ( wrapper . classes ( ) ) . toContain ( 'sidebar-form' )
13+ } )
14+ } ) ;
Original file line number Diff line number Diff line change 1+ import { mount } from 'vue-test-utils'
2+ import SidebarHeader from "../Sidebar/SidebarHeader" ;
3+
4+ describe ( "SidebarHeader.vue" , ( ) => {
5+ // Inspect the raw component options
6+ it ( 'has hasSlotDefault computed property' , ( ) => {
7+ expect ( typeof SidebarHeader . computed . hasSlotDefault ) . toBe ( 'function' )
8+ } )
9+ it ( 'renders correctly' , ( ) => {
10+ const wrapper = mount ( SidebarHeader , { slots : { default : 'test' } } )
11+ expect ( wrapper . element ) . toMatchSnapshot ( )
12+ expect ( wrapper . classes ( ) ) . toContain ( 'sidebar-header' )
13+ } )
14+ } ) ;
You can’t perform that action at this time.
0 commit comments