Skip to content

Commit

Permalink
Fixes tests
Browse files Browse the repository at this point in the history
  • Loading branch information
saltiyazan committed Jul 1, 2024
1 parent 6c1dc65 commit 4e955b0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion ui/src/app/certificate_requests/row.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,8 @@ test('Certificate Requests Table Row', () => {
<Row id={csr.ID} csr={csr.CSR} certificate={csr.Certificate} ActionMenuExpanded={actionMenuExpanded} setActionMenuExpanded={setActionMenuExpanded as Dispatch<SetStateAction<number>>} />
</QueryClientProvider>
)
expect(screen.getByText('10.152.183.53')).toBeDefined() // Common name of CSR
const commonNames = screen.getAllByText('10.152.183.53');
expect(commonNames.length).toBeGreaterThan(0);
expect(screen.getByLabelText('certificate-expiry-date').innerHTML).toMatch(/^Thu Mar 27/)
const openActionsButton = screen.getByLabelText("action-menu-button")
fireEvent.click(openActionsButton);
Expand Down
4 changes: 2 additions & 2 deletions ui/src/app/certificate_requests/table.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,6 @@ test('CertificateRequestsPage', () => {
< CertificateRequestsTable csrs={rows} />
</QueryClientProvider>
)
expect(screen.getByRole('table', {})).toBeDefined()
expect(screen.getByText('example.com')).toBeDefined() // Common Name of one of the CSR's
const commonNames = screen.getAllByText('example.com');
expect(commonNames.length).toBeGreaterThan(0);
})

0 comments on commit 4e955b0

Please sign in to comment.