From 73f0bda2a6fb8070f1f3fbaa8034aa4cfa61999e Mon Sep 17 00:00:00 2001 From: Josh Krawczyk Date: Thu, 14 May 2020 17:08:09 -0400 Subject: [PATCH] More Vue tests and fixes --- package-lock.json | 12 +- package.json | 4 +- .../automation/AutomationManager.vue | 11 +- .../automation/modals/PolicyForm.vue | 39 +++--- src/store/automation.js | 6 +- .../unit/automation/automationmanager.spec.js | 28 ++--- .../unit/automation/automationmodals.spec.js | 117 ++++++++++++++++-- 7 files changed, 152 insertions(+), 65 deletions(-) diff --git a/package-lock.json b/package-lock.json index 80af573..4e306a3 100644 --- a/package-lock.json +++ b/package-lock.json @@ -2100,9 +2100,9 @@ "dev": true }, "@vue/test-utils": { - "version": "1.0.0-beta.31", - "resolved": "https://registry.npmjs.org/@vue/test-utils/-/test-utils-1.0.0-beta.31.tgz", - "integrity": "sha512-IlhSx5hyEVnbvDZ3P98R1jNmy88QAd/y66Upn4EcvxSD5D4hwOutl3dIdfmSTSXs4b9DIMDnEVjX7t00cvOnvg==", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/@vue/test-utils/-/test-utils-1.0.2.tgz", + "integrity": "sha512-pnRWJbb0cLqjSJIKRpqoSISeYtufEn8D16VmhlCrDWIVt4iAY4Og4JpOPmFytvtQVz96p6n7T6ERI55ue6n0Ew==", "dev": true, "requires": { "dom-event-types": "^1.0.0", @@ -13127,9 +13127,9 @@ "integrity": "sha512-VfPwgcGABbGAue9+sfrD4PuwFar7gPb1yl1UK1MwXoQPAw0BKSqWfoYCT/ThFrdEVWoI51dBuyCoiNU9bZDZxQ==" }, "vue-cli-plugin-quasar": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/vue-cli-plugin-quasar/-/vue-cli-plugin-quasar-2.0.1.tgz", - "integrity": "sha512-j7dQywO916YBsp7GduSDBH4mdQEKZdkInmO3u0hpzJuybInTJYQb/oQKmq5XcLl/pV/9MAaxNx2g3CXuwY2tFQ==", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/vue-cli-plugin-quasar/-/vue-cli-plugin-quasar-2.0.2.tgz", + "integrity": "sha512-wHtjjKEpTq1vAhiRHRids/DDx1r1A53q/LVc2PgeI7sycbBLDdGhY3+XnysmME+OMReecqOP1IhNC7b8hL09tA==", "dev": true }, "vue-hot-reload-api": { diff --git a/package.json b/package.json index ca51276..73102b4 100644 --- a/package.json +++ b/package.json @@ -22,11 +22,11 @@ "@vue/cli-plugin-unit-jest": "^4.3.1", "@vue/cli-plugin-vuex": "~4.3.1", "@vue/cli-service": "~4.3.1", - "@vue/test-utils": "1.0.0-beta.31", + "@vue/test-utils": "~1.0.2", "babel-plugin-transform-imports": "1.5.0", "stylus": "^0.54.7", "stylus-loader": "^3.0.2", - "vue-cli-plugin-quasar": "~2.0.1", + "vue-cli-plugin-quasar": "^2.0.2", "vue-template-compiler": "^2.6.11" }, "browserslist": [ diff --git a/src/components/automation/AutomationManager.vue b/src/components/automation/AutomationManager.vue index 82f24d6..806f16a 100644 --- a/src/components/automation/AutomationManager.vue +++ b/src/components/automation/AutomationManager.vue @@ -4,7 +4,7 @@ - + - + @@ -190,7 +190,8 @@ export default { this.$store.dispatch("automation/loadPolicyChecks", keys[0]); this.$store.dispatch("automation/loadPolicyAutomatedTasks", keys[0]); }, - clearRow() { + clearRow () { + this.getPolicies(); this.$store.commit("automation/setSelectedPolicy", null); this.$store.commit("automation/setPolicyChecks", {}); this.$store.commit("automation/setPolicyAutomatedTasks", {}); diff --git a/src/components/automation/modals/PolicyForm.vue b/src/components/automation/modals/PolicyForm.vue index c5ea762..facc54c 100644 --- a/src/components/automation/modals/PolicyForm.vue +++ b/src/components/automation/modals/PolicyForm.vue @@ -1,6 +1,6 @@