+ Loading frameworks… +
+ ) : state.status === "unavailable" ? ( ++ {incomplete + ? "None of the findings checked map to a framework requirement." + : "None of the findings behind this issue map to a framework requirement."} +
+ ) : ( ++ Not every finding could be checked, so this list may be + incomplete. +
+ )} + > + )} +Compliance from a capped preview
: null, +})); vi.mock("@/components/findings/send-to-jira-modal", () => ({ SendToJiraModal: () => null, })); @@ -103,6 +107,39 @@ describe("IssueDetail", () => { ).toBeInTheDocument(); }); + it("tells the compliance section when the findings preview was capped", async () => { + // Given - one more finding than the preview loads + getIssueMock.mockResolvedValue({ + data: { + attributes: { + resource_uids: [], + finding_uids: Array.from( + { length: ISSUE_FINDINGS_LIMIT + 1 }, + (_, i) => `uid-${i}`, + ), + }, + relationships: { scan: { data: { type: "scans", id: "scan-1" } } }, + }, + }); + getIssueFindingsMock.mockResolvedValue([ + { + id: "f1", + checkId: "check-a", + checkTitle: "Check A", + severity: "high", + resourceUid: "r1", + }, + ]); + + // When + render(