From 60482ab627c981deec4c1fba0c1a13d644fa90f7 Mon Sep 17 00:00:00 2001
From: Yoshie Muranaka <yoshiemuranaka@gmail.com>
Date: Mon, 6 Jul 2020 13:44:25 -0700
Subject: Add test hooks to TableFilter component

Adding standardized test hooks to filter dropdown component,
nested checkbox options and clear all button.

Signed-off-by: Yoshie Muranaka <yoshiemuranaka@gmail.com>
Change-Id: I46d7166f35eb51ebf5eb6a136266591884e93324
---
 src/components/Global/TableFilter.vue | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

(limited to 'src/components/Global/TableFilter.vue')

diff --git a/src/components/Global/TableFilter.vue b/src/components/Global/TableFilter.vue
index f2167a06..afbe8a73 100644
--- a/src/components/Global/TableFilter.vue
+++ b/src/components/Global/TableFilter.vue
@@ -14,6 +14,7 @@
       variant="link"
       no-caret
       right
+      data-test-id="tableFilter-dropdown-options"
       @hide="dropdownVisible = false"
       @show="dropdownVisible = true"
     >
@@ -32,6 +33,7 @@
               v-for="value in filter.values"
               :key="value"
               :value="value"
+              :data-test-id="`tableFilter-checkbox-${value}`"
               @change="onChange($event, { filter, value })"
             >
               {{ value }}
@@ -39,7 +41,11 @@
           </b-form-checkbox-group>
         </b-form-group>
       </b-dropdown-form>
-      <b-dropdown-item-button variant="primary" @click="clearAllTags">
+      <b-dropdown-item-button
+        variant="primary"
+        data-test-id="tableFilter-button-clearAll"
+        @click="clearAllTags"
+      >
         {{ $t('global.action.clearAll') }}
       </b-dropdown-item-button>
     </b-dropdown>
-- 
cgit v1.2.3

