From b045fb96fe87883b087910d5bb4c5b1624b762fb Mon Sep 17 00:00:00 2001 From: Josh Krawczyk Date: Sat, 30 May 2020 11:38:51 -0400 Subject: [PATCH] Changes api and views to match new checks rework. Fixed the Vue tests to match the new data --- .../automation/AutomationManager.vue | 2 +- src/components/automation/PolicyChecksTab.vue | 115 +++++++-------- src/components/modals/checks/ScriptCheck.vue | 4 - src/store/automation.js | 16 +- src/store/store.js | 4 +- .../unit/automation/automationmanager.spec.js | 6 +- tests/unit/automation/policycheckstab.spec.js | 137 +++++++++--------- tests/unit/automation/policytasksstab.js | 8 + tests/unit/automation/policytasksstab.spec.js | 1 - 9 files changed, 133 insertions(+), 160 deletions(-) create mode 100644 tests/unit/automation/policytasksstab.js delete mode 100644 tests/unit/automation/policytasksstab.spec.js diff --git a/src/components/automation/AutomationManager.vue b/src/components/automation/AutomationManager.vue index 0391efa..b51f36a 100644 --- a/src/components/automation/AutomationManager.vue +++ b/src/components/automation/AutomationManager.vue @@ -247,7 +247,7 @@ export default { }, clearRow() { this.$store.commit("automation/setSelectedPolicy", null); - this.$store.commit("automation/setPolicyChecks", {}); + this.$store.commit("automation/setPolicyChecks", []); this.$store.commit("automation/setPolicyAutomatedTasks", {}); }, refresh() { diff --git a/src/components/automation/PolicyChecksTab.vue b/src/components/automation/PolicyChecksTab.vue index 7a04880..59c76a7 100644 --- a/src/components/automation/PolicyChecksTab.vue +++ b/src/components/automation/PolicyChecksTab.vue @@ -1,5 +1,5 @@