test: fix component tests by adding localStorage mock and resolving store interference

This commit is contained in:
Ilia Mashkov
2026-04-22 09:42:00 +03:00
parent cbc978df6d
commit 8fc8a7ee6f
4 changed files with 65 additions and 7 deletions
@@ -114,7 +114,7 @@ describe('ComboControl', () => {
it('opens popover with vertical slider on trigger click', async () => {
render(ComboControl, { control: makeControl(50), controlLabel: 'Size control' });
expect(screen.queryByRole('slider')).not.toBeInTheDocument();
await fireEvent.click(screen.getByLabelText('Size control'));
await fireEvent.click(screen.getByText('Size control'));
await waitFor(() => expect(screen.getByRole('slider')).toBeInTheDocument());
});
});