Skip to content

Commit

Permalink
release 1.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Diego Jara committed Mar 13, 2018
1 parent 48e524c commit 7d71999
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 4 deletions.
2 changes: 1 addition & 1 deletion package-lock.json

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

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "vue-swatches",
"version": "1.0.0-rc.10",
"version": "1.0.0",
"description": "Help the user picking beautiful colors!",
"author": "Diego Jara <[email protected]>",
"private": false,
Expand Down Expand Up @@ -36,7 +36,7 @@
"dev": "webpack-dev-server --inline --progress --config build/webpack.dev.conf.js",
"bundle": "node build/bundle.js",
"docs": "node build/build-docs.js",
"unit": "jest --config test/unit/jest.conf.js --coverage",
"unit": "jest --config test/unit/jest.conf.js --coverage --no-cache",
"unit:watch": "jest --config test/unit/jest.conf.js --watchAll",
"test": "npm run unit",
"lint": "eslint --ext .js,.vue src test/unit/specs",
Expand Down
5 changes: 4 additions & 1 deletion src/Check.vue
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,10 @@

<script>
export default {
name: 'check'
name: 'check',
data () {
return { }
}
}
</script>

Expand Down
3 changes: 3 additions & 0 deletions src/Swatch.vue
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,9 @@ export default {
// default is especified in `Swatches.vue`
}
},
data () {
return { }
},
computed: {
computedSwatchStyle () {
return {
Expand Down
19 changes: 19 additions & 0 deletions test/unit/specs/props.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -1101,6 +1101,25 @@ describe('Props', () => {
.not.toBeTruthy()
})
})

test('should close the popover when click to ok button', () => {
const componentWrapper = mount(Swatches, {
propsData: {
showFallback: true,
inline: false
}
})
componentWrapper.vm.showPopover()
const container = componentWrapper.find('.vue-swatches__container')
const button = componentWrapper.find('.vue-swatches__fallback__button')
button.trigger('click')

return Vue.nextTick()
.then(() => {
expect(container.isVisible())
.not.toBeTruthy()
})
})
})

describe('swatch-size', () => {
Expand Down

0 comments on commit 7d71999

Please sign in to comment.