Skip to content
Snippets Groups Projects
Commit d62aa385 authored by mateusz-winiarczyk's avatar mateusz-winiarczyk
Browse files

fix(overlays): change disabling overlay button label to hide

parent d7e3a63d
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...,!169fix(overlays): change disabling overlay button label to hide
...@@ -76,7 +76,7 @@ describe('OverlayListItem - component', () => { ...@@ -76,7 +76,7 @@ describe('OverlayListItem - component', () => {
}, },
}); });
}); });
it('should disable overlay on view button click if overlay is active', async () => { it('should hide overlay on view button click if overlay is active', async () => {
const OVERLAY_ID = 21; const OVERLAY_ID = 21;
const { store } = renderComponent({ const { store } = renderComponent({
map: { map: {
...@@ -88,7 +88,7 @@ describe('OverlayListItem - component', () => { ...@@ -88,7 +88,7 @@ describe('OverlayListItem - component', () => {
models: { ...MODELS_INITIAL_STATE_MOCK, data: [CORE_PD_MODEL_MOCK] }, models: { ...MODELS_INITIAL_STATE_MOCK, data: [CORE_PD_MODEL_MOCK] },
}); });
const ViewButton = screen.getByRole('button', { name: 'Disable' }); const ViewButton = screen.getByRole('button', { name: 'Hide' });
await act(() => { await act(() => {
ViewButton.click(); ViewButton.click();
}); });
...@@ -108,7 +108,7 @@ describe('OverlayListItem - component', () => { ...@@ -108,7 +108,7 @@ describe('OverlayListItem - component', () => {
}); });
expect(screen.getByAltText('spinner icon')).toBeVisible(); expect(screen.getByAltText('spinner icon')).toBeVisible();
expect(screen.getByText('Disable')).toBeVisible(); expect(screen.getByText('Hide')).toBeVisible();
}); });
}); });
......
...@@ -30,7 +30,7 @@ export const OverlayListItem = ({ name, overlayId }: OverlayListItemProps): JSX. ...@@ -30,7 +30,7 @@ export const OverlayListItem = ({ name, overlayId }: OverlayListItemProps): JSX.
className="animate-spin" className="animate-spin"
/> />
)} )}
{isOverlayActive || isOverlayActive ? 'Disable' : 'View'} {isOverlayActive || isOverlayActive ? 'Hide' : 'View'}
</Button> </Button>
<Button className="max-h-8" variantStyles="ghost" onClick={downloadOverlay}> <Button className="max-h-8" variantStyles="ghost" onClick={downloadOverlay}>
Download Download
......
...@@ -53,7 +53,7 @@ export const UserOverlayListItem = ({ ...@@ -53,7 +53,7 @@ export const UserOverlayListItem = ({
className="animate-spin" className="animate-spin"
/> />
)} )}
{isOverlayActive || isOverlayLoading ? 'Disable' : 'View'} {isOverlayActive || isOverlayLoading ? 'Hide' : 'View'}
</Button> </Button>
<UserOverlayActions overlay={userOverlay} /> <UserOverlayActions overlay={userOverlay} />
</div> </div>
......
...@@ -262,7 +262,7 @@ describe('UserOverlaysWithoutGroup - component', () => { ...@@ -262,7 +262,7 @@ describe('UserOverlaysWithoutGroup - component', () => {
toggleOverlayButton.click(); toggleOverlayButton.click();
}); });
expect(screen.getByTestId('toggle-overlay-button')).toHaveTextContent('Disable'); expect(screen.getByTestId('toggle-overlay-button')).toHaveTextContent('Hide');
}); });
it('should call window.open with download link after download action click', async () => { it('should call window.open with download link after download action click', async () => {
renderComponent({ renderComponent({
...@@ -346,6 +346,6 @@ describe('UserOverlaysWithoutGroup - component', () => { ...@@ -346,6 +346,6 @@ describe('UserOverlaysWithoutGroup - component', () => {
}); });
expect(screen.getByAltText('spinner icon')).toBeVisible(); expect(screen.getByAltText('spinner icon')).toBeVisible();
expect(screen.getByText('Disable')).toBeVisible(); expect(screen.getByText('Hide')).toBeVisible();
}); });
}); });
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