Skip to content
Merged
Prev Previous commit
Next Next commit
Fix frontend test
  • Loading branch information
presleyp committed Nov 17, 2022
commit 82d62c7ff70b3e2d65894cf2eba37c60ea1e2a4b
4 changes: 3 additions & 1 deletion site/src/pages/AuditPage/AuditPage.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,9 @@ describe("AuditPage", () => {
render(<AuditPage />)

await waitForLoaderToBeRemoved()
getAuditLogsSpy.mockReset()
getAuditLogsSpy
.mockReset()
.mockResolvedValue({ audit_logs: [MockAuditLog], count: 1 })

const filterField = screen.getByLabelText("Filter")
const query = "resource_type:workspace action:create"
Expand Down
2 changes: 1 addition & 1 deletion site/src/testHelpers/handlers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ export const handlers = [
ctx.status(200),
ctx.json({
audit_logs: [M.MockAuditLog, M.MockAuditLog2],
count: 2
count: 2,
}),
)
}),
Expand Down