From 7d71999cb9c3041a3d31c4dc79cd768b289934f0 Mon Sep 17 00:00:00 2001 From: Diego Jara Date: Tue, 13 Mar 2018 01:44:56 -0500 Subject: [PATCH] release 1.0.0 --- package-lock.json | 2 +- package.json | 4 ++-- src/Check.vue | 5 ++++- src/Swatch.vue | 3 +++ test/unit/specs/props.spec.js | 19 +++++++++++++++++++ 5 files changed, 29 insertions(+), 4 deletions(-) diff --git a/package-lock.json b/package-lock.json index 3481dbf..08c831d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "vue-swatches", - "version": "1.0.0-rc.10", + "version": "1.0.0", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index c0d66f6..08374c5 100644 --- a/package.json +++ b/package.json @@ -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 ", "private": false, @@ -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", diff --git a/src/Check.vue b/src/Check.vue index d5ca1b6..fb4ec5d 100644 --- a/src/Check.vue +++ b/src/Check.vue @@ -13,7 +13,10 @@ diff --git a/src/Swatch.vue b/src/Swatch.vue index d762cfd..fbf2316 100644 --- a/src/Swatch.vue +++ b/src/Swatch.vue @@ -69,6 +69,9 @@ export default { // default is especified in `Swatches.vue` } }, + data () { + return { } + }, computed: { computedSwatchStyle () { return { diff --git a/test/unit/specs/props.spec.js b/test/unit/specs/props.spec.js index 93325a7..b49acd0 100644 --- a/test/unit/specs/props.spec.js +++ b/test/unit/specs/props.spec.js @@ -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', () => {