From 8d98cc5c8a0440d40dde2f336f61cac81829a09e Mon Sep 17 00:00:00 2001 From: Laura Martinez Garcia Date: Wed, 11 Oct 2023 13:45:26 +0200 Subject: [PATCH] fix: fix tests --- .../history-queries/store/__tests__/actions.spec.ts | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/packages/x-components/src/x-modules/history-queries/store/__tests__/actions.spec.ts b/packages/x-components/src/x-modules/history-queries/store/__tests__/actions.spec.ts index cabcf53c43..5a31795317 100644 --- a/packages/x-components/src/x-modules/history-queries/store/__tests__/actions.spec.ts +++ b/packages/x-components/src/x-modules/history-queries/store/__tests__/actions.spec.ts @@ -289,7 +289,11 @@ describe('testing history queries module actions', () => { beforeEach(() => { [gato, perro] = ['gato', 'perro'].map(query => - createHistoryQuery({ query, timestamp: store.state.sessionTimeStampInMs + 1, filters: [] }) + createHistoryQuery({ + query, + timestamp: store.state.sessionTimeStampInMs + 1, + selectedFilters: [] + }) ); resetStateWith({ historyQueries: [gato, perro] }); }); @@ -367,7 +371,7 @@ describe('testing history queries module actions', () => { // eslint-disable-next-line max-len it('updates a history query if search response change because a filter is selected', async () => { gato.totalResults = 50; - const filters = Object.values(requestFilters)[0]; + const selectedFilters = Object.values(requestFilters)[0]; resetStateWith({ historyQueries: [gato, perro] }); await store.dispatch('updateHistoryQueriesWithSearchResponse', { request: { @@ -379,7 +383,7 @@ describe('testing history queries module actions', () => { results, totalResults }); - expectHistoryQueriesToEqual([{ ...gato, totalResults, filters }, perro]); + expectHistoryQueriesToEqual([{ ...gato, totalResults, selectedFilters }, perro]); }); }); });