Fix broken frontend test.
This commit is contained in:
parent
f0fd81b752
commit
49477330c2
|
@ -79,6 +79,8 @@ describe("Export Modal", () => {
|
||||||
props: propsCfg,
|
props: propsCfg,
|
||||||
})
|
})
|
||||||
|
|
||||||
|
expect(propsCfg.filters[0].field).toBe("1:Cost")
|
||||||
|
|
||||||
expect(screen.getByTestId("filters-applied")).toBeVisible()
|
expect(screen.getByTestId("filters-applied")).toBeVisible()
|
||||||
expect(screen.getByTestId("filters-applied").textContent).toBe(
|
expect(screen.getByTestId("filters-applied").textContent).toBe(
|
||||||
"Filters applied"
|
"Filters applied"
|
||||||
|
|
|
@ -147,8 +147,12 @@ export const processSearchFilters = (
|
||||||
{
|
{
|
||||||
logicalOperator: allOr ? UILogicalOperator.ANY : UILogicalOperator.ALL,
|
logicalOperator: allOr ? UILogicalOperator.ANY : UILogicalOperator.ALL,
|
||||||
filters: filters.map(filter => {
|
filters: filters.map(filter => {
|
||||||
filter.field = removeKeyNumbering(filter.field)
|
const trimmedFilter = _.pick(
|
||||||
return _.pick(filter, FILTER_ALLOWED_KEYS) as SearchFilter
|
filter,
|
||||||
|
FILTER_ALLOWED_KEYS
|
||||||
|
) as SearchFilter
|
||||||
|
trimmedFilter.field = removeKeyNumbering(trimmedFilter.field)
|
||||||
|
return trimmedFilter
|
||||||
}),
|
}),
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
|
|
Loading…
Reference in New Issue