Skip to content

Commit 83f64a6

Browse files
author
Kristiyan Ivanov
authored
Fe/feature/ri 7278 and ri 7279 (#4802)
* RI-7279 - "test" element is visible on top of the db keys list * RI-7278 - Remove the old navigation for DBs * RI-7278 - Remove the old navigation for DBs - removed unused variables and updated tests
1 parent ed3b7bd commit 83f64a6

File tree

3 files changed

+4
-11
lines changed

3 files changed

+4
-11
lines changed

redisinsight/ui/src/components/navigation-menu/NavigationMenu.spec.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ describe('NavigationMenu', () => {
7676
}))
7777
render(<NavigationMenu />)
7878

79-
expect(screen.queryByTestId('browser-page-btn"')).not.toBeInTheDocument()
79+
expect(screen.queryByTestId('browser-page-btn')).not.toBeInTheDocument()
8080
})
8181

8282
it('should render help menu', () => {
@@ -137,7 +137,7 @@ describe('NavigationMenu', () => {
137137
expect(render(<NavigationMenu />)).toBeTruthy()
138138
})
139139

140-
it('should render private routes with instanceId', () => {
140+
it('should not render private routes with instanceId', () => {
141141
;(appInfoSelector as jest.Mock).mockImplementation(() => ({
142142
...mockAppInfoSelector,
143143
server: {
@@ -146,8 +146,8 @@ describe('NavigationMenu', () => {
146146
}))
147147
render(<NavigationMenu />)
148148

149-
expect(screen.getByTestId('browser-page-btn')).toBeTruthy()
150-
expect(screen.getByTestId('workbench-page-btn')).toBeTruthy()
149+
expect(screen.queryByTestId('browser-page-btn')).not.toBeInTheDocument()
150+
expect(screen.queryByTestId('workbench-page-btn')).not.toBeInTheDocument()
151151
})
152152

153153
it('should render public routes', () => {

redisinsight/ui/src/components/navigation-menu/NavigationMenu.tsx

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,13 +29,11 @@ import styles from './styles.module.scss'
2929

3030
const NavigationMenu = () => {
3131
const {
32-
privateRoutes,
3332
privateRdiRoutes,
3433
isRdiWorkspace,
3534
publicRoutes,
3635
getAdditionPropsForHighlighting,
3736
highlightedPages,
38-
connectedInstanceId,
3937
connectedRdiInstanceId,
4038
} = useNavigation()
4139

@@ -133,9 +131,6 @@ const NavigationMenu = () => {
133131
>
134132
<SideBarContainer>
135133
<RedisLogo isRdiWorkspace={isRdiWorkspace} />
136-
{connectedInstanceId &&
137-
!isRdiWorkspace &&
138-
privateRoutes.map(renderNavItem)}
139134
{connectedRdiInstanceId &&
140135
isRdiWorkspace &&
141136
privateRdiRoutes.map(renderNavItem)}

redisinsight/ui/src/pages/browser/BrowserPage.tsx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,6 @@ import BrowserLeftPanel from './components/browser-left-panel'
5959
import BrowserRightPanel from './components/browser-right-panel'
6060

6161
import styles from './styles.module.scss'
62-
import UploadModal from '../rdi/pipeline-management/components/upload-modal/UploadModal'
6362

6463
const widthResponsiveSize = 1280
6564
const widthExplorePanel = 460
@@ -336,7 +335,6 @@ const BrowserPage = () => {
336335
borderRadius: `8px`,
337336
}}
338337
>
339-
<UploadModal >{<div>test</div>}</UploadModal>
340338
<BrowserLeftPanel
341339
selectedKey={selectedKey}
342340
selectKey={selectKey}

0 commit comments

Comments
 (0)