From c867d6da5202c51c2836ce17f3311f7072d59ddd Mon Sep 17 00:00:00 2001 From: alexm Date: Wed, 26 Mar 2025 08:56:37 +0100 Subject: [PATCH] test: refs #8449 refactor VnLog and VnLogFilter unit test --- src/components/common/VnLog.vue | 32 ------------------- src/components/common/VnLogFilter.vue | 1 + src/components/common/__tests__/VnLog.spec.js | 23 ------------- .../common/__tests__/VnLogFilter.spec.js | 28 ++++++++++++++++ 4 files changed, 29 insertions(+), 55 deletions(-) create mode 100644 src/components/common/__tests__/VnLogFilter.spec.js diff --git a/src/components/common/VnLog.vue b/src/components/common/VnLog.vue index c96cc2b253..e9805815e9 100644 --- a/src/components/common/VnLog.vue +++ b/src/components/common/VnLog.vue @@ -71,32 +71,8 @@ const filter = { }; const paginate = ref(); -const actions = ref(); -const changeInput = ref(); const searchInput = ref(); -const userRadio = ref(); -const userSelect = ref(); -const dateFrom = ref(); -const dateTo = ref(); const selectedFilters = ref({}); -const checkboxOptions = ref({ - insert: { - label: 'Creates', - selected: false, - }, - update: { - label: 'Edits', - selected: false, - }, - delete: { - label: 'Deletes', - selected: false, - }, - select: { - label: 'Accesses', - selected: false, - }, -}); let validations = models; let pointRecord = ref(null); @@ -298,15 +274,7 @@ function exprBuilder(param, value) { async function clearFilter() { selectedFilters.value = {}; byRecord.value = false; - userSelect.value = undefined; searchInput.value = undefined; - changeInput.value = undefined; - dateFrom.value = undefined; - dateTo.value = undefined; - userRadio.value = undefined; - Object.keys(checkboxOptions.value).forEach( - (opt) => (checkboxOptions.value[opt].selected = false), - ); await applyFilter(); } diff --git a/src/components/common/VnLogFilter.vue b/src/components/common/VnLogFilter.vue index 2c3f0e3888..dd34d5c99d 100644 --- a/src/components/common/VnLogFilter.vue +++ b/src/components/common/VnLogFilter.vue @@ -112,6 +112,7 @@ function getActions() { :info="t('tooltips.search')" dense filled + data-cy="vnLog-search" />