Skip to content

Commit

Permalink
refactor: minor changes
Browse files Browse the repository at this point in the history
  • Loading branch information
woothu committed Feb 18, 2020
1 parent 9ea0664 commit f3a1e22
Show file tree
Hide file tree
Showing 7 changed files with 31 additions and 17 deletions.
6 changes: 3 additions & 3 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,19 +37,19 @@
"vuex": "^3.1.2"
},
"devDependencies": {
"@babel/core": "^7.8.3",
"@vue/cli-plugin-babel": "^4.1.2",
"@vue/cli-plugin-e2e-nightwatch": "^4.1.2",
"@vue/cli-plugin-eslint": "^4.1.2",
"@vue/cli-plugin-unit-jest": "^4.1.2",
"@vue/cli-service": "^4.1.2",
"@vue/test-utils": "1.0.0-beta.29",
"@babel/core": "^7.8.3",
"babel-eslint": "^10.0.3",
"babel-jest": "^25.1.0",
"core-js": "^3.6.4",
"chromedriver": "^79.0.2",
"core-js": "^3.6.4",
"eslint": "^6.8.0",
"eslint-plugin-vue": "^6.1.2",
"eslint-plugin-vue": "^6.2.1",
"node-sass": "^4.13.1",
"npm-run-all": "^4.1.5",
"sass-loader": "^8.0.2",
Expand Down
2 changes: 1 addition & 1 deletion src/containers/TheFooter.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<template>
<CFooter>
<CFooter :fixed="false">
<div>
<a href="https://coreui.io" target="_blank">CoreUI</a>
<span class="ml-1">&copy; 2020 creativeLabs.</span>
Expand Down
11 changes: 6 additions & 5 deletions src/views/base/Tabs.vue
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui
officia deserunt mollit anim id est laborum.
</CTab>
<CTab title="Profile">
<CTab title="Profile" active>
2. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore
et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut
aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum
Expand Down Expand Up @@ -81,7 +81,7 @@
Tabs with icons
</CCardHeader>
<CCardBody>
<CTabs>
<CTabs :active-tab.sync="activeTab">
<CTab active>
<template slot="title">
<CIcon name="cil-calculator"/>
Expand Down Expand Up @@ -123,7 +123,7 @@
</CCardHeader>
<CCardBody>
<CTabs add-tab-classes="mt-1">
<CTab active>
<CTab>
<template slot="title">
<CIcon name="cil-calculator"/> {{tabs[0]}}
</template>
Expand All @@ -133,7 +133,7 @@
dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui
officia deserunt mollit anim id est laborum.
</CTab>
<CTab>
<CTab active>
<template slot="title">
<CIcon name="cil-basket"/> {{tabs[1]}}
</template>
Expand Down Expand Up @@ -211,7 +211,8 @@ export default {
'Calculator',
'Shopping cart',
'Charts'
]
],
activeTab: 1
}
}
}
Expand Down
18 changes: 15 additions & 3 deletions tests/unit/containers/TheContainer.spec.js
Original file line number Diff line number Diff line change
@@ -1,27 +1,39 @@
import CoreuiVue from '@coreui/vue'
import { shallowMount, createLocalVue } from '@vue/test-utils';
import VueRouter from 'vue-router'
import Vuex from 'vuex'
import TheContainer from '@/containers/TheContainer'

const localVue = createLocalVue()
localVue.use(Vuex)
localVue.use(VueRouter)
const router = new VueRouter()

localVue.use(CoreuiVue)
const store = new Vuex.Store({
state: {
darkMode: false,
sidebarShow: 'responsive',
sidebarMinimize: false,
asideShow: false
}
})

const router = new VueRouter()

describe('TheContainer.vue', () => {
it('has a name', () => {
expect(TheContainer.name).toBe('TheContainer')
})
test('renders correctly', () => {
const wrapper = shallowMount(TheContainer, {
store,
localVue,
router
router
})
expect(wrapper.element).toMatchSnapshot()
})
it('is Vue instance', () => {
const wrapper = shallowMount(TheContainer, {
store,
localVue,
router
})
Expand Down
1 change: 0 additions & 1 deletion tests/unit/containers/__snapshots__/TheFooter.spec.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

exports[`TheFooter.vue renders correctly 1`] = `
<cfooter-stub
fixed="true"
tag="footer"
>
<div>
Expand Down
4 changes: 3 additions & 1 deletion tests/unit/views/base/__snapshots__/Tabs.spec.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ exports[`Tabs.vue renders correctly 1`] = `
</ctab-stub>
<ctab-stub
active="true"
activeclass="router-link-active"
event="click"
exactactiveclass="router-link-exact-active"
Expand Down Expand Up @@ -184,6 +185,7 @@ exports[`Tabs.vue renders correctly 1`] = `
<ccardbody-stub>
<ctabs-stub
activetab="1"
fade="true"
variant="tabs"
>
Expand Down Expand Up @@ -274,7 +276,6 @@ exports[`Tabs.vue renders correctly 1`] = `
variant="tabs"
>
<ctab-stub
active="true"
activeclass="router-link-active"
event="click"
exactactiveclass="router-link-exact-active"
Expand All @@ -298,6 +299,7 @@ exports[`Tabs.vue renders correctly 1`] = `
</ctab-stub>
<ctab-stub
active="true"
activeclass="router-link-active"
event="click"
exactactiveclass="router-link-exact-active"
Expand Down

0 comments on commit f3a1e22

Please sign in to comment.