@@ -5,19 +5,19 @@ describe("Comparator", () => {
5
5
"https://api.securityscorecards.dev/projects/github.com/nodejs/node/?commit=2ac5e9889aba461f5a54d320973d2574980d206b" ,
6
6
{
7
7
statusCode : 404 ,
8
- }
8
+ } ,
9
9
) . as ( "getDataPreviousCommit" ) ;
10
10
11
11
cy . intercept (
12
12
"GET" ,
13
13
"https://api.securityscorecards.dev/projects/github.com/nodejs/node/?commit=077fd7d83d7d41695137c1af5b9be1d72250e69e" ,
14
14
{
15
15
statusCode : 404 ,
16
- }
16
+ } ,
17
17
) . as ( "getDataCurrentCommit" ) ;
18
18
19
19
cy . visit (
20
- "localhost:3000/openssf-scorecard-api-visualizer/#/projects/github.com/nodejs/node/compare/2ac5e9889aba461f5a54d320973d2574980d206b/077fd7d83d7d41695137c1af5b9be1d72250e69e"
20
+ "localhost:3000/openssf-scorecard-api-visualizer/#/projects/github.com/nodejs/node/compare/2ac5e9889aba461f5a54d320973d2574980d206b/077fd7d83d7d41695137c1af5b9be1d72250e69e" ,
21
21
) ;
22
22
cy . wait ( "@getDataPreviousCommit" ) ; // first try as react query behaves
23
23
cy . wait ( "@getDataPreviousCommit" ) ; // second try
@@ -27,11 +27,11 @@ describe("Comparator", () => {
27
27
cy . wait ( "@getDataCurrentCommit" ) ; // third try
28
28
cy . get ( "h1" , { timeout : 10000 } ) . should (
29
29
"contain" ,
30
- "An error ocurred. Please refresh/try again."
30
+ "An error ocurred. Please refresh/try again." ,
31
31
) ;
32
32
cy . get ( "p" , { timeout : 10000 } ) . should (
33
33
"contain" ,
34
- "Please check if the org/repository/commit has been analysed by the Scorecard."
34
+ "Please check if the org/repository/commit has been analysed by the Scorecard." ,
35
35
) ;
36
36
} ) ;
37
37
it ( "should render error when the previous commit hash does not exist" , ( ) => {
@@ -40,7 +40,7 @@ describe("Comparator", () => {
40
40
"https://api.securityscorecards.dev/projects/github.com/nodejs/node/?commit=2ac5e9889aba461f5a54d320973d2574980d206b" ,
41
41
{
42
42
statusCode : 404 ,
43
- }
43
+ } ,
44
44
) . as ( "getDataPreviousCommit" ) ;
45
45
46
46
cy . intercept (
@@ -49,11 +49,11 @@ describe("Comparator", () => {
49
49
{
50
50
statusCode : 200 ,
51
51
fixture : "077fd7d83d7d41695137c1af5b9be1d72250e69e.json" ,
52
- }
52
+ } ,
53
53
) . as ( "getDataCurrentCommit" ) ;
54
54
55
55
cy . visit (
56
- "localhost:3000/openssf-scorecard-api-visualizer/#/projects/github.com/nodejs/node/compare/2ac5e9889aba461f5a54d320973d2574980d206b/077fd7d83d7d41695137c1af5b9be1d72250e69e"
56
+ "localhost:3000/openssf-scorecard-api-visualizer/#/projects/github.com/nodejs/node/compare/2ac5e9889aba461f5a54d320973d2574980d206b/077fd7d83d7d41695137c1af5b9be1d72250e69e" ,
57
57
) ;
58
58
cy . wait ( "@getDataPreviousCommit" ) ; // first try as react query behaves
59
59
cy . wait ( "@getDataPreviousCommit" ) ; // second try
@@ -62,11 +62,11 @@ describe("Comparator", () => {
62
62
63
63
cy . get ( "h1" , { timeout : 10000 } ) . should (
64
64
"contain" ,
65
- "An error ocurred. Please refresh/try again."
65
+ "An error ocurred. Please refresh/try again." ,
66
66
) ;
67
67
cy . get ( "p" , { timeout : 10000 } ) . should (
68
68
"contain" ,
69
- "Please check if the org/repository/commit has been analysed by the Scorecard."
69
+ "Please check if the org/repository/commit has been analysed by the Scorecard." ,
70
70
) ;
71
71
} ) ;
72
72
it ( "should render error when the current commit hash does not exist" , ( ) => {
@@ -76,19 +76,19 @@ describe("Comparator", () => {
76
76
{
77
77
statusCode : 200 ,
78
78
fixture : "2ac5e9889aba461f5a54d320973d2574980d206b.json" ,
79
- }
79
+ } ,
80
80
) . as ( "getDataPreviousCommit" ) ;
81
81
82
82
cy . intercept (
83
83
"GET" ,
84
84
"https://api.securityscorecards.dev/projects/github.com/nodejs/node/?commit=077fd7d83d7d41695137c1af5b9be1d72250e69e" ,
85
85
{
86
86
statusCode : 404 ,
87
- }
87
+ } ,
88
88
) . as ( "getDataCurrentCommit" ) ;
89
89
90
90
cy . visit (
91
- "localhost:3000/openssf-scorecard-api-visualizer/#/projects/github.com/nodejs/node/compare/2ac5e9889aba461f5a54d320973d2574980d206b/077fd7d83d7d41695137c1af5b9be1d72250e69e"
91
+ "localhost:3000/openssf-scorecard-api-visualizer/#/projects/github.com/nodejs/node/compare/2ac5e9889aba461f5a54d320973d2574980d206b/077fd7d83d7d41695137c1af5b9be1d72250e69e" ,
92
92
) ;
93
93
cy . wait ( "@getDataPreviousCommit" ) ; // first try as react query behaves
94
94
cy . wait ( "@getDataCurrentCommit" ) ; // first try as react query behaves
@@ -97,11 +97,11 @@ describe("Comparator", () => {
97
97
98
98
cy . get ( "h1" , { timeout : 10000 } ) . should (
99
99
"contain" ,
100
- "An error ocurred. Please refresh/try again."
100
+ "An error ocurred. Please refresh/try again." ,
101
101
) ;
102
102
cy . get ( "p" , { timeout : 10000 } ) . should (
103
103
"contain" ,
104
- "Please check if the org/repository/commit has been analysed by the Scorecard."
104
+ "Please check if the org/repository/commit has been analysed by the Scorecard." ,
105
105
) ;
106
106
} ) ;
107
107
it ( "should compare data from each commit as expected" , ( ) => {
@@ -111,7 +111,7 @@ describe("Comparator", () => {
111
111
{
112
112
statusCode : 200 ,
113
113
fixture : "2ac5e9889aba461f5a54d320973d2574980d206b.json" ,
114
- }
114
+ } ,
115
115
) . as ( "getDataPreviousCommit" ) ;
116
116
117
117
cy . intercept (
@@ -120,23 +120,23 @@ describe("Comparator", () => {
120
120
{
121
121
statusCode : 200 ,
122
122
fixture : "077fd7d83d7d41695137c1af5b9be1d72250e69e.json" ,
123
- }
123
+ } ,
124
124
) . as ( "getDataCurrentCommit" ) ;
125
125
126
126
cy . visit (
127
- "localhost:3000/openssf-scorecard-api-visualizer/#/projects/github.com/nodejs/node/compare/2ac5e9889aba461f5a54d320973d2574980d206b/077fd7d83d7d41695137c1af5b9be1d72250e69e"
127
+ "localhost:3000/openssf-scorecard-api-visualizer/#/projects/github.com/nodejs/node/compare/2ac5e9889aba461f5a54d320973d2574980d206b/077fd7d83d7d41695137c1af5b9be1d72250e69e" ,
128
128
) ;
129
129
cy . wait ( "@getDataPreviousCommit" ) ; // first try as react query behaves
130
130
cy . wait ( "@getDataCurrentCommit" ) ; // first try as react query behaves
131
131
132
132
cy . get ( "h1" ) . should (
133
133
"contain" ,
134
- "OpenSSF Scorecard comparator for nodejs/node"
134
+ "OpenSSF Scorecard comparator for nodejs/node" ,
135
135
) ;
136
136
137
137
cy . get ( '[data-testid="current-score-and-badge"] > h2' ) . should (
138
138
"contain" ,
139
- "Score: 7.3/10"
139
+ "Score: 7.3/10" ,
140
140
) ;
141
141
142
142
cy . get ( '[data-testid="current-score-and-badge"] > span' )
@@ -146,36 +146,36 @@ describe("Comparator", () => {
146
146
147
147
cy . get ( '[data-testid="commits-analysis"]' ) . should (
148
148
"contain" ,
149
- "Analysis of commits (077fd7d8) and (2ac5e988)"
149
+ "Analysis of commits (077fd7d8) and (2ac5e988)" ,
150
150
) ;
151
151
152
152
cy . get ( '[data-testid="commits-analysis"] > a:first-child' )
153
153
. should ( "contain" , "(077fd7d8)" )
154
154
. and ( "have.attr" , "href" )
155
155
. and (
156
156
"include" ,
157
- "https://github.com/nodejs/node/commit/077fd7d83d7d41695137c1af5b9be1d72250e69e"
157
+ "https://github.com/nodejs/node/commit/077fd7d83d7d41695137c1af5b9be1d72250e69e" ,
158
158
) ;
159
159
160
160
cy . get ( '[data-testid="commits-analysis"] > a:last-child' )
161
161
. should ( "contain" , "(2ac5e988)" )
162
162
. and ( "have.attr" , "href" )
163
163
. and (
164
164
"include" ,
165
- "https://github.com/nodejs/node/commit/2ac5e9889aba461f5a54d320973d2574980d206b"
165
+ "https://github.com/nodejs/node/commit/2ac5e9889aba461f5a54d320973d2574980d206b" ,
166
166
) ;
167
-
167
+
168
168
// @TODO : restore when https://github.com/KoolTheba/openssf-scorecard-api-visualizer/actions/runs/5457182231/jobs/9930918315?pr=106 is solved
169
169
// cy.get('[data-testid="date"]').should("contain", "Date: June 8, 2023");
170
170
171
171
cy . get ( '[data-testid="scorecard-version"]' ) . should (
172
172
"contain" ,
173
- "Scorecard version v4.10.5 (27cfe92e)"
173
+ "Scorecard version v4.10.5 (27cfe92e)" ,
174
174
) ;
175
175
176
176
cy . get ( '[data-testid="Binary-Artifacts"]' ) . should (
177
177
"contain" ,
178
- "Binary-Artifacts"
178
+ "Binary-Artifacts" ,
179
179
) ;
180
180
cy . get ( '[data-testid="Binary-Artifacts"] > div > span' )
181
181
. should ( "contain" , "Unchanged" )
@@ -185,15 +185,15 @@ describe("Comparator", () => {
185
185
186
186
cy . get ( '[data-testid="Branch-Protection"]' ) . should (
187
187
"contain" ,
188
- "Branch-Protection"
188
+ "Branch-Protection" ,
189
189
) ;
190
190
cy . get ( '[data-testid="Branch-Protection"] > div > span' )
191
191
. should ( "contain" , "Unchanged" )
192
192
. and ( "have.css" , "background-color" )
193
193
. and ( "eq" , "rgb(108, 117, 125)" ) ;
194
194
cy . get ( '[data-testid="Branch-Protection"] > span' ) . should (
195
195
"contain" ,
196
- "-1/10"
196
+ "-1/10" ,
197
197
) ;
198
198
199
199
cy . get ( '[data-testid="CI-Tests"]' ) . should ( "contain" , "CI-Tests" ) ;
@@ -204,20 +204,20 @@ describe("Comparator", () => {
204
204
cy . get ( '[data-testid="CI-Tests"] > span' ) . and ( "contain" , "9/10" ) ;
205
205
cy . get ( '[data-testid="CI-Tests"] ~ h4' ) . should (
206
206
"contain" ,
207
- "Additional details / variations"
207
+ "Additional details / variations" ,
208
208
) ;
209
209
210
210
cy . get ( '[data-testid="CII-Best-Practices"]' ) . should (
211
211
"contain" ,
212
- "CII-Best-Practices"
212
+ "CII-Best-Practices" ,
213
213
) ;
214
214
cy . get ( '[data-testid="CII-Best-Practices"] > div > span' )
215
215
. should ( "contain" , "Unchanged" )
216
216
. and ( "have.css" , "background-color" )
217
217
. and ( "eq" , "rgb(108, 117, 125)" ) ;
218
218
cy . get ( '[data-testid="CII-Best-Practices"] > span' ) . should (
219
219
"contain" ,
220
- "5/10"
220
+ "5/10" ,
221
221
) ;
222
222
223
223
cy . get ( '[data-testid="Code-Review"]' ) . should ( "contain" , "Code-Review" ) ;
@@ -228,7 +228,7 @@ describe("Comparator", () => {
228
228
cy . get ( '[data-testid="Code-Review"] > span' ) . should ( "contain" , "0/10" ) ;
229
229
cy . get ( '[data-testid="Code-Review"] ~ h4' ) . should (
230
230
"contain" ,
231
- "Additional details / variations"
231
+ "Additional details / variations" ,
232
232
) ;
233
233
234
234
cy . get ( '[data-testid="Contributors"]' ) . should ( "contain" , "Contributors" ) ;
@@ -240,28 +240,28 @@ describe("Comparator", () => {
240
240
241
241
cy . get ( '[data-testid="Dangerous-Workflow"]' ) . should (
242
242
"contain" ,
243
- "Dangerous-Workflow"
243
+ "Dangerous-Workflow" ,
244
244
) ;
245
245
cy . get ( '[data-testid="Dangerous-Workflow"] > div > span' )
246
246
. should ( "contain" , "Unchanged" )
247
247
. and ( "have.css" , "background-color" )
248
248
. and ( "eq" , "rgb(108, 117, 125)" ) ;
249
249
cy . get ( '[data-testid="Dangerous-Workflow"] > span' ) . should (
250
250
"contain" ,
251
- "10/10"
251
+ "10/10" ,
252
252
) ;
253
253
254
254
cy . get ( '[data-testid="Dependency-Update-Tool"]' ) . should (
255
255
"contain" ,
256
- "Dependency-Update-Tool"
256
+ "Dependency-Update-Tool" ,
257
257
) ;
258
258
cy . get ( '[data-testid="Dependency-Update-Tool"] > div > span' )
259
259
. should ( "contain" , "Unchanged" )
260
260
. and ( "have.css" , "background-color" )
261
261
. and ( "eq" , "rgb(108, 117, 125)" ) ;
262
262
cy . get ( '[data-testid="Dependency-Update-Tool"] > span' ) . should (
263
263
"contain" ,
264
- "10/10"
264
+ "10/10" ,
265
265
) ;
266
266
267
267
cy . get ( '[data-testid="Fuzzing"]' ) . should ( "contain" , "Fuzzing" ) ;
@@ -286,7 +286,7 @@ describe("Comparator", () => {
286
286
cy . get ( '[data-testid="Maintained"] > span' ) . should ( "contain" , "10/10" ) ;
287
287
cy . get ( '[data-testid="Maintained"] ~ h4' ) . should (
288
288
"contain" ,
289
- "Additional details / variations"
289
+ "Additional details / variations" ,
290
290
) ;
291
291
292
292
cy . get ( '[data-testid="Packaging"]' ) . should ( "contain" , "Packaging" ) ;
@@ -298,19 +298,19 @@ describe("Comparator", () => {
298
298
299
299
cy . get ( '[data-testid="Pinned-Dependencies"]' ) . should (
300
300
"contain" ,
301
- "Pinned-Dependencies"
301
+ "Pinned-Dependencies" ,
302
302
) ;
303
303
cy . get ( '[data-testid="Pinned-Dependencies"] > div > span' )
304
304
. should ( "contain" , "Unchanged" )
305
305
. and ( "have.css" , "background-color" )
306
306
. and ( "eq" , "rgb(108, 117, 125)" ) ;
307
307
cy . get ( '[data-testid="Pinned-Dependencies"] > span' ) . should (
308
308
"contain" ,
309
- "7/10"
309
+ "7/10" ,
310
310
) ;
311
311
cy . get ( '[data-testid="Pinned-Dependencies"] ~ h4' ) . should (
312
312
"contain" ,
313
- "Additional details / variations"
313
+ "Additional details / variations" ,
314
314
) ;
315
315
316
316
cy . get ( '[data-testid="SAST"]' ) . should ( "contain" , "SAST" ) ;
@@ -322,7 +322,7 @@ describe("Comparator", () => {
322
322
323
323
cy . get ( '[data-testid="Security-Policy"]' ) . should (
324
324
"contain" ,
325
- "Security-Policy"
325
+ "Security-Policy" ,
326
326
) ;
327
327
cy . get ( '[data-testid="Security-Policy"] > div > span' )
328
328
. should ( "contain" , "Unchanged" )
@@ -332,7 +332,7 @@ describe("Comparator", () => {
332
332
333
333
cy . get ( '[data-testid="Signed-Releases"]' ) . should (
334
334
"contain" ,
335
- "Signed-Releases"
335
+ "Signed-Releases" ,
336
336
) ;
337
337
cy . get ( '[data-testid="Signed-Releases"] > div > span' )
338
338
. should ( "contain" , "Unchanged" )
@@ -342,24 +342,24 @@ describe("Comparator", () => {
342
342
343
343
cy . get ( '[data-testid="Token-Permissions"]' ) . should (
344
344
"contain" ,
345
- "Token-Permissions"
345
+ "Token-Permissions" ,
346
346
) ;
347
347
cy . get ( '[data-testid="Token-Permissions"] > div > span' )
348
348
. should ( "contain" , "Unchanged" )
349
349
. and ( "have.css" , "background-color" )
350
350
. and ( "eq" , "rgb(108, 117, 125)" ) ;
351
351
cy . get ( '[data-testid="Token-Permissions"] > span' ) . should (
352
352
"contain" ,
353
- "10/10"
353
+ "10/10" ,
354
354
) ;
355
355
cy . get ( '[data-testid="Token-Permissions"] ~ h4' ) . should (
356
356
"contain" ,
357
- "Additional details / variations"
357
+ "Additional details / variations" ,
358
358
) ;
359
359
360
360
cy . get ( '[data-testid="Vulnerabilities"]' ) . should (
361
361
"contain" ,
362
- "Vulnerabilities"
362
+ "Vulnerabilities" ,
363
363
) ;
364
364
cy . get ( '[data-testid="Vulnerabilities"] > div > span' )
365
365
. should ( "contain" , "Increased 2.7" )
@@ -368,7 +368,7 @@ describe("Comparator", () => {
368
368
cy . get ( '[data-testid="Vulnerabilities"] > span' ) . should ( "contain" , "10/10" ) ;
369
369
cy . get ( '[data-testid="Vulnerabilities"] ~ h4' ) . should (
370
370
"contain" ,
371
- "Additional details / variations"
371
+ "Additional details / variations" ,
372
372
) ;
373
373
} ) ;
374
374
} ) ;
0 commit comments