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