chore(ui): use FontAwesome icon instead of 'x' for FilterInputLabel

This commit is contained in:
Łukasz Mierzwa
2019-06-07 14:22:42 +01:00
parent ad4d352c28
commit e1782df1a7
2 changed files with 7 additions and 6 deletions

View File

@@ -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"
/>
</TooltipWrapper>
<span
className="close ml-1 align-text-bottom cursor-pointer text-reset"
<FontAwesomeIcon
className="cursor-pointer text-reset ml-1 close"
icon={faTimes}
onClick={() => alertStore.filters.removeFilter(filter.raw)}
>
<span className="text-reset">&times;</span>
</span>
/>
</button>
);
}

View File

@@ -171,7 +171,8 @@ describe("<FilterInputLabel /> 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(