Skip to content

Commit 83bcab1

Browse files
committed
test(ui): update slow log tests to use new redis ui table
re #RI-7437
1 parent d448f27 commit 83bcab1

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

redisinsight/ui/src/pages/slow-log/components/SlowLogTable/SlowLogTable.spec.tsx

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,13 @@ describe('SlowLogTable', () => {
3131
})
3232

3333
it('should render data', () => {
34-
expect(
35-
render(<SlowLogTable {...mockedProps} items={mockedData} />),
36-
).toBeTruthy()
37-
expect(screen.getAllByLabelText(/^row$/)).toHaveLength(mockedData.length)
34+
const { container } = render(
35+
<SlowLogTable {...mockedProps} items={mockedData} />,
36+
)
37+
38+
expect(container).toBeTruthy()
39+
40+
const rows = container.querySelectorAll('[data-row-type="regular"]')
41+
expect(rows).toHaveLength(mockedData.length)
3842
})
3943
})

0 commit comments

Comments
 (0)