File tree Expand file tree Collapse file tree 5 files changed +15
-18
lines changed
Expand file tree Collapse file tree 5 files changed +15
-18
lines changed Original file line number Diff line number Diff line change 11<template >
22 <component :is =" tag" :class =" classList" >
3- <slot >Footer </slot >
3+ <slot ></slot >
44 </component >
55</template >
66
@@ -12,7 +12,10 @@ export default {
1212 type: String ,
1313 default: ' footer'
1414 },
15- fixed: Boolean
15+ fixed: {
16+ type: Boolean ,
17+ default: true
18+ }
1619 },
1720 computed: {
1821 classList () {
Original file line number Diff line number Diff line change @@ -3,20 +3,13 @@ import Component from '../CFooter'
33
44const ComponentName = 'CFooter'
55const wrapper = mount ( Component )
6- // /* eslint-disable no-console */
7- // console.log("something")
6+
87
98describe ( `${ ComponentName } .vue` , ( ) => {
109 it ( 'has a name' , ( ) => {
11- expect ( Component . name ) . toMatch ( ComponentName )
10+ expect ( Component . name ) . toBe ( ComponentName )
1211 } )
13- // Inspect the raw component options
14- // it('has isFixed method', () => {
15- // expect(typeof Component.methods.isFixed).toBe('function')
16- // })
1712 it ( 'renders correctly' , ( ) => {
1813 expect ( wrapper . element ) . toMatchSnapshot ( )
19- expect ( wrapper . element . textContent ) . toEqual ( 'Footer' )
20- // expect(wrapper.classes()).toContain('app-footer')
2114 } )
22- } ) ;
15+ } )
Original file line number Diff line number Diff line change 22
33exports [` CFooter .vue renders correctly 1` ] = `
44<footer
5- class = " c-footer"
6- >
7- Footer
8- </footer >
5+ class = " c-footer c-footer-fixed"
6+ />
97` ;
Original file line number Diff line number Diff line change @@ -16,7 +16,10 @@ export default {
1616 type: String ,
1717 default: ' light'
1818 },
19- fixed: Boolean ,
19+ fixed: {
20+ type: Boolean ,
21+ default: true
22+ },
2023 withSubheader: Boolean
2124 },
2225 computed: {
Original file line number Diff line number Diff line change 22
33exports [` CHeader .vue renders correctly 1` ] = `
44<header
5- class = " c-header c-header-light"
5+ class = " c-header c-header-light c-header-fixed "
66/>
77` ;
You can’t perform that action at this time.
0 commit comments