Skip to content

Commit 815e596

Browse files
committed
#RI-6338 - fix tests, remove unused component
1 parent 09aa6db commit 815e596

File tree

5 files changed

+10
-95
lines changed

5 files changed

+10
-95
lines changed

redisinsight/ui/src/pages/home/components/add-database-flow-tabs/AddDatabaseFlowTabs.spec.tsx

Lines changed: 0 additions & 20 deletions
This file was deleted.

redisinsight/ui/src/pages/home/components/add-database-flow-tabs/AddDatabaseFlowTabs.tsx

Lines changed: 0 additions & 46 deletions
This file was deleted.

redisinsight/ui/src/pages/home/components/add-database-flow-tabs/index.ts

Lines changed: 0 additions & 3 deletions
This file was deleted.

redisinsight/ui/src/pages/home/components/add-database-flow-tabs/styles.module.scss

Lines changed: 0 additions & 10 deletions
This file was deleted.

redisinsight/ui/src/pages/home/components/database-panel-dialog/DatabasePanelDialog.spec.tsx

Lines changed: 10 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -11,46 +11,40 @@ describe('DatabasePanelDialog', () => {
1111
expect(render(<DatabasePanelDialog {...instance(mockedProps)} />)).toBeTruthy()
1212
})
1313

14-
it('should change tab to manual and render proper form', () => {
14+
it('should render proper form by dfeault', () => {
1515
render(<DatabasePanelDialog {...instance(mockedProps)} isOpen onClose={jest.fn()} />)
1616

17-
fireEvent.click(screen.getByTestId('add-database_tab_manual'))
18-
19-
expect(screen.getByTestId('add-db_manual')).toBeInTheDocument()
17+
expect(screen.getByTestId('connection-url')).toBeInTheDocument()
2018
})
2119

22-
it('should change tab to cloud and render proper form', () => {
20+
it('should change screen to cloud and render proper form', () => {
2321
render(<DatabasePanelDialog {...instance(mockedProps)} isOpen onClose={jest.fn()} />)
2422

25-
fireEvent.click(screen.getByTestId('add-database_tab_cloud'))
23+
fireEvent.click(screen.getByTestId('discover-cloud-btn'))
2624

2725
expect(screen.getByTestId('add-db_cloud-api')).toBeInTheDocument()
2826
})
2927

30-
it('should change tab to software and render proper form', () => {
28+
it('should change screen to software and render proper form', () => {
3129
render(<DatabasePanelDialog {...instance(mockedProps)} isOpen onClose={jest.fn()} />)
3230

33-
fireEvent.click(screen.getByTestId('add-database_tab_software'))
31+
fireEvent.click(screen.getByTestId('option-btn-software'))
3432

3533
expect(screen.getByTestId('add-db_cluster')).toBeInTheDocument()
3634
})
3735

38-
it('should change tab to software sentinel and render proper form', async () => {
36+
it('should change tab to sentinel and render proper form', async () => {
3937
render(<DatabasePanelDialog {...instance(mockedProps)} isOpen onClose={jest.fn()} />)
4038

41-
fireEvent.click(screen.getByTestId('add-database_tab_software'))
42-
43-
await act(async () => {
44-
fireEvent.click(document.querySelector('[data-test-subj="radio-btn-sentinel"] label') as Element)
45-
})
39+
fireEvent.click(screen.getByTestId('option-btn-sentinel'))
4640

4741
expect(screen.getByTestId('add-db_sentinel')).toBeInTheDocument()
4842
})
4943

50-
it('should change tab to import render proper form', async () => {
44+
it('should change screen to import render proper form', async () => {
5145
render(<DatabasePanelDialog {...instance(mockedProps)} isOpen onClose={jest.fn()} />)
5246

53-
fireEvent.click(screen.getByTestId('add-database_tab_import'))
47+
fireEvent.click(screen.getByTestId('option-btn-import'))
5448

5549
expect(screen.getByTestId('add-db_import')).toBeInTheDocument()
5650
})

0 commit comments

Comments
 (0)