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 1
1
<template >
2
2
<component :is =" tag" :class =" classList" >
3
- <slot >Footer </slot >
3
+ <slot ></slot >
4
4
</component >
5
5
</template >
6
6
@@ -12,7 +12,10 @@ export default {
12
12
type: String ,
13
13
default: ' footer'
14
14
},
15
- fixed: Boolean
15
+ fixed: {
16
+ type: Boolean ,
17
+ default: true
18
+ }
16
19
},
17
20
computed: {
18
21
classList () {
Original file line number Diff line number Diff line change @@ -3,20 +3,13 @@ import Component from '../CFooter'
3
3
4
4
const ComponentName = 'CFooter'
5
5
const wrapper = mount ( Component )
6
- // /* eslint-disable no-console */
7
- // console.log("something")
6
+
8
7
9
8
describe ( `${ ComponentName } .vue` , ( ) => {
10
9
it ( 'has a name' , ( ) => {
11
- expect ( Component . name ) . toMatch ( ComponentName )
10
+ expect ( Component . name ) . toBe ( ComponentName )
12
11
} )
13
- // Inspect the raw component options
14
- // it('has isFixed method', () => {
15
- // expect(typeof Component.methods.isFixed).toBe('function')
16
- // })
17
12
it ( 'renders correctly' , ( ) => {
18
13
expect ( wrapper . element ) . toMatchSnapshot ( )
19
- expect ( wrapper . element . textContent ) . toEqual ( 'Footer' )
20
- // expect(wrapper.classes()).toContain('app-footer')
21
14
} )
22
- } ) ;
15
+ } )
Original file line number Diff line number Diff line change 2
2
3
3
exports [` CFooter .vue renders correctly 1` ] = `
4
4
<footer
5
- class = " c-footer"
6
- >
7
- Footer
8
- </footer >
5
+ class = " c-footer c-footer-fixed"
6
+ />
9
7
` ;
Original file line number Diff line number Diff line change @@ -16,7 +16,10 @@ export default {
16
16
type: String ,
17
17
default: ' light'
18
18
},
19
- fixed: Boolean ,
19
+ fixed: {
20
+ type: Boolean ,
21
+ default: true
22
+ },
20
23
withSubheader: Boolean
21
24
},
22
25
computed: {
Original file line number Diff line number Diff line change 2
2
3
3
exports [` CHeader .vue renders correctly 1` ] = `
4
4
<header
5
- class = " c-header c-header-light"
5
+ class = " c-header c-header-light c-header-fixed "
6
6
/>
7
7
` ;
You can’t perform that action at this time.
0 commit comments