Skip to content

Commit cc724e8

Browse files
committed
added
1 parent 9be431d commit cc724e8

File tree

2 files changed

+3
-12
lines changed

2 files changed

+3
-12
lines changed

frontend/__tests__/unit/data/mockSnapshotData.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ export const mockSnapshotDetailsData = {
66
createdAt: '2025-03-01T22:00:34.361937+00:00',
77
startAt: '2024-12-01T00:00:00+00:00',
88
endAt: '2024-12-31T22:00:30+00:00',
9+
summary:
10+
'Snapshot Summary: 10 users (e.g., abhayymishraaaa, vithobasatish); 3 projects (e.g., OWASP Top 10 for Business Logic Abuse, OWASP ProdSecMan); 14 chapters (e.g., OWASP Oshawa, OWASP Juiz de Fora); 422 issues (e.g., Duplicate Components, Cyclonedx seems to ignore some configuration options); 71 releases (e.g., 2.0.1, v5.0.1)',
911
status: 'completed',
1012
errorMessage: '',
1113
newReleases: [

frontend/__tests__/unit/pages/SnapshotDetails.test.tsx

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -80,19 +80,8 @@ describe('SnapshotDetailsPage', () => {
8080
})
8181

8282
test('correctly parses and displays summary data', async () => {
83-
// Create mock data with specific summary text
84-
const summaryText =
85-
'Snapshot Summary: 10 users (e.g., abhayymishraaaa, vithobasatish); 3 projects (e.g., OWASP Top 10 for Business Logic Abuse, OWASP ProdSecMan); 14 chapters (e.g., OWASP Oshawa, OWASP Juiz de Fora); 422 issues (e.g., Duplicate Components, Cyclonedx seems to ignore some configuration options); 71 releases (e.g., 2.0.1, v5.0.1)'
86-
87-
const mockDataWithSummary = {
88-
snapshot: {
89-
...mockSnapshotDetailsData.snapshot,
90-
summary: summaryText,
91-
},
92-
}
93-
9483
;(useQuery as jest.Mock).mockReturnValue({
95-
data: mockDataWithSummary,
84+
data: mockSnapshotDetailsData,
9685
error: null,
9786
})
9887

0 commit comments

Comments
 (0)