Skip to content

Commit

Permalink
fix: fix the failing tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ahmadshaheer committed Dec 22, 2024
1 parent 5af0fce commit e76b7e2
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion frontend/src/pages/TracesExplorer/Filter/Filter.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ export function Filter(props: FilterProps): JSX.Element {
});
}

if (isEqual(currentQuery, preparedQuery)) {
if (isEqual(currentQuery, preparedQuery) && !props?.resetAll) {
return;
}
redirectWithQueryBuilderData(preparedQuery);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,13 @@ jest.mock('container/OptionsMenu/useOptionsMenu', () => ({
default: (): any => optionMenuReturn,
}));

jest.mock('react-redux', () => ({
...jest.requireActual('react-redux'),
useSelector: (): any => ({
loading: false,
}),
}));

describe('TracesExplorer - Filters', () => {
// Initial filter panel rendering
// Test the initial state like which filters section are opened, default state of duration slider, etc.
Expand Down

0 comments on commit e76b7e2

Please sign in to comment.