Skip to content
Snippets Groups Projects
Commit 4a1c589a authored by Tadeusz Miesiąc's avatar Tadeusz Miesiąc
Browse files

test(map navigation): separated two tests

parent 7790e460
No related branches found
No related tags found
2 merge requests!223reset the pin numbers before search results are fetch (so the results will be...,!47feat(submaps tabs): open submap on click
Pipeline #80799 passed
......@@ -36,18 +36,34 @@ describe('MapNavigation - component', () => {
});
const mainMapButton = screen.getByRole('button', { name: 'Main map' });
const mainMapCloseButton = await within(mainMapButton).queryByTestId('close-icon');
expect(mainMapButton).toBeInTheDocument();
const histamineMapButton = screen.getByRole('button', { name: 'Histamine signaling' });
expect(histamineMapButton).toBeInTheDocument();
const prknMapButton = screen.getByRole('button', { name: 'PRKN substrates' });
expect(prknMapButton).toBeInTheDocument();
});
it('all maps should have close button expect main map', async () => {
renderComponent({
map: {
data: { ...initialMapDataFixture, openedMaps: openedMapsThreeSubmapsFixture },
loading: 'succeeded',
error: { message: '', name: '' },
},
});
const mainMapButton = screen.getByRole('button', { name: 'Main map' });
const mainMapCloseButton = await within(mainMapButton).queryByTestId('close-icon');
expect(mainMapCloseButton).not.toBeInTheDocument();
const histamineMapButton = screen.getByRole('button', { name: 'Histamine signaling' });
const histamineMapCloseButton = await within(histamineMapButton).getByTestId('close-icon');
expect(histamineMapButton).toBeInTheDocument();
expect(histamineMapCloseButton).toBeInTheDocument();
const prknMapButton = screen.getByRole('button', { name: 'PRKN substrates' });
const prknMapCloseButton = await within(prknMapButton).getByTestId('close-icon');
expect(prknMapButton).toBeInTheDocument();
expect(prknMapCloseButton).toBeInTheDocument();
});
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment