From e1782df1a7753d2de78e94d793c2c2637dd15ada Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Mierzwa?= Date: Fri, 7 Jun 2019 14:22:42 +0100 Subject: [PATCH] chore(ui): use FontAwesome icon instead of 'x' for FilterInputLabel --- ui/src/Components/Labels/FilterInputLabel/index.js | 10 +++++----- .../Components/Labels/FilterInputLabel/index.test.js | 3 ++- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/ui/src/Components/Labels/FilterInputLabel/index.js b/ui/src/Components/Labels/FilterInputLabel/index.js index d282d9f9e..abc06d56e 100644 --- a/ui/src/Components/Labels/FilterInputLabel/index.js +++ b/ui/src/Components/Labels/FilterInputLabel/index.js @@ -8,6 +8,7 @@ import { RIEInput } from "@attently/riek"; import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; import { faExclamationCircle } from "@fortawesome/free-solid-svg-icons/faExclamationCircle"; import { faSpinner } from "@fortawesome/free-solid-svg-icons/faSpinner"; +import { faTimes } from "@fortawesome/free-solid-svg-icons/faTimes"; import { AlertStore } from "Stores/AlertStore"; import { QueryOperators } from "Common/Query"; @@ -99,12 +100,11 @@ const FilterInputLabel = observer( classEditing="py-0 border-0 bg-light" /> - alertStore.filters.removeFilter(filter.raw)} - > - × - + /> ); } diff --git a/ui/src/Components/Labels/FilterInputLabel/index.test.js b/ui/src/Components/Labels/FilterInputLabel/index.test.js index b8827684a..dfb8a00f0 100644 --- a/ui/src/Components/Labels/FilterInputLabel/index.test.js +++ b/ui/src/Components/Labels/FilterInputLabel/index.test.js @@ -171,7 +171,8 @@ describe(" onChange", () => { filter={alertStore.filters.values[0]} /> ); - const button = tree.find(".close"); + + const button = tree.find("svg.close"); button.simulate("click"); expect(alertStore.filters.values).toHaveLength(1); expect(alertStore.filters.values).toContainEqual(