Skip to content

Commit

Permalink
fix: fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
lauramargar committed Oct 11, 2023
1 parent 2830d94 commit 8d98cc5
Showing 1 changed file with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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] });
});
Expand Down Expand Up @@ -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: {
Expand All @@ -379,7 +383,7 @@ describe('testing history queries module actions', () => {
results,
totalResults
});
expectHistoryQueriesToEqual([{ ...gato, totalResults, filters }, perro]);
expectHistoryQueriesToEqual([{ ...gato, totalResults, selectedFilters }, perro]);
});
});
});

0 comments on commit 8d98cc5

Please sign in to comment.