mirror of
https://github.com/Novaloop-AG/healthchat-web.git
synced 2026-11-04 10:32:44 +00:00
New room list: filter list can be collapsed (#29992)
* feat: add new hook to check if a node is visible * feat: filters in new room list can be collapsed * feat: add animation to filter list * feat: hide chevron when list fit on one line * fix: use correct label for expand button * test: update room list panel snapshots * test: add tests for useIsNodeVisible * chore: update i18n * test: add tests for primary filters * test(e2e): update existing screenshots * test(e2e): update primary filter tests * chore: typo in css file * refactor: replace ternary by if in filter condition * feat: compute filter height instead of hardcoded value * fix: floor floating computation on filter * refactor: move hooks to dedicated files * test: update tests * feat: rework collapse feature * test: remove room list panel snapshot * test: update room list primary filter tests * test(e2e): update screenshots * test(e2e): update screenshots * test(e2e): fix favourite filter in scroll behaviour test * fix: accessibility order when tabbing
This commit is contained in:
@@ -28,16 +28,13 @@ describe("<RoomListPanel />", () => {
|
||||
});
|
||||
|
||||
it("should render the RoomListSearch component when UIComponent.FilterContainer is at true", () => {
|
||||
const { asFragment } = renderComponent();
|
||||
renderComponent();
|
||||
expect(screen.getByRole("button", { name: "Search Ctrl K" })).toBeInTheDocument();
|
||||
expect(asFragment()).toMatchSnapshot();
|
||||
});
|
||||
|
||||
it("should not render the RoomListSearch component when UIComponent.FilterContainer is at false", () => {
|
||||
mocked(shouldShowComponent).mockReturnValue(false);
|
||||
const { asFragment } = renderComponent();
|
||||
|
||||
renderComponent();
|
||||
expect(screen.queryByRole("button", { name: "Search Ctrl K" })).toBeNull();
|
||||
expect(asFragment()).toMatchSnapshot();
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user