This repository was archived by the owner on Mar 13, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 4 files changed +21
-31
lines changed Expand file tree Collapse file tree 4 files changed +21
-31
lines changed Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ const insertData = async () => {
12
12
challengeId : '30104644' ,
13
13
memberId : '123456' ,
14
14
handle : 'user1' ,
15
- score : 100 ,
15
+ aggregateScore : 100 ,
16
16
testsPassed : 10 ,
17
17
totalTestCases : 10 ,
18
18
groupIds : [ '100' , '200' ]
@@ -23,7 +23,7 @@ const insertData = async () => {
23
23
challengeId : '30104644' ,
24
24
memberId : '123457' ,
25
25
handle : 'user2' ,
26
- score : 90 ,
26
+ aggregateScore : 90 ,
27
27
testsPassed : 9 ,
28
28
totalTestCases : 10 ,
29
29
groupIds : [ '100' , '200' ]
@@ -34,7 +34,7 @@ const insertData = async () => {
34
34
challengeId : '30104644' ,
35
35
memberId : '123458' ,
36
36
handle : 'user3' ,
37
- score : 80 ,
37
+ aggregateScore : 80 ,
38
38
testsPassed : 8 ,
39
39
totalTestCases : 10 ,
40
40
groupIds : [ '100' , '200' ]
@@ -45,7 +45,7 @@ const insertData = async () => {
45
45
challengeId : '30104645' ,
46
46
memberId : '123456' ,
47
47
handle : 'user1' ,
48
- score : 40 ,
48
+ aggregateScore : 40 ,
49
49
testsPassed : 8 ,
50
50
totalTestCases : 20 ,
51
51
groupIds : [ '100' , '200' ]
@@ -56,7 +56,7 @@ const insertData = async () => {
56
56
challengeId : '30104645' ,
57
57
memberId : '123457' ,
58
58
handle : 'user2' ,
59
- score : 50 ,
59
+ aggregateScore : 50 ,
60
60
testsPassed : 10 ,
61
61
totalTestCases : 20 ,
62
62
groupIds : [ '100' , '200' ]
@@ -67,7 +67,7 @@ const insertData = async () => {
67
67
challengeId : '30104646' ,
68
68
memberId : '123456' ,
69
69
handle : 'user1' ,
70
- score : 190 ,
70
+ aggregateScore : 190 ,
71
71
testsPassed : 4 ,
72
72
totalTestCases : 6 ,
73
73
groupIds : [ '100' ]
@@ -78,7 +78,7 @@ const insertData = async () => {
78
78
challengeId : '30104646' ,
79
79
memberId : '123458' ,
80
80
handle : 'user3' ,
81
- score : 200 ,
81
+ aggregateScore : 200 ,
82
82
testsPassed : 5 ,
83
83
totalTestCases : 6 ,
84
84
groupIds : [ '100' ]
Original file line number Diff line number Diff line change @@ -11,13 +11,13 @@ prepare(function (done) {
11
11
. persist ( )
12
12
. post ( '/oauth/token' )
13
13
. reply ( 200 , { access_token : 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJyb2xlcyI6WyJUb3Bjb2RlciBVc2VyIiwiQ29ubmVjdCBTdXBwb3J0IiwiYWRtaW5pc3RyYXRvciIsInRlc3RSb2xlIiwiYWFhIiwidG9ueV90ZXN0XzEiLCJDb25uZWN0IE1hbmFnZXIiLCJDb25uZWN0IEFkbWluIiwiY29waWxvdCIsIkNvbm5lY3QgQ29waWxvdCBNYW5hZ2VyIl0sImlzcyI6Imh0dHBzOi8vYXBpLnRvcGNvZGVyLWRldi5jb20iLCJoYW5kbGUiOiJUb255SiIsImV4cCI6MTU2NTY4MTkyMCwidXNlcklkIjoiODU0Nzg5OSIsImlhdCI6MTU1NTY4MTMyMCwiZW1haWwiOiJhamVmdHNAdG9wY29kZXIuY29tIiwianRpIjoiMTlhMDkzNzAtMjk4OC00N2I4LTkxODktMGRhODVjNjM0ZWQyIn0.V8nsQpbzQ_4iEd0dAbuYsfeydnhSAEQ95AKKwl8RONw' } )
14
- . get ( '/v3 /challenges?filter=id=30000001' )
14
+ . get ( '/v4 /challenges?filter=id=30000001' )
15
15
. reply ( 200 , challengeAPIResponse [ 0 ] )
16
- . get ( '/v3 /challenges?filter=id=30051825' )
16
+ . get ( '/v4 /challenges?filter=id=30051825' )
17
17
. reply ( 200 , challengeAPIResponse [ 1 ] )
18
- . get ( '/v3 /challenges?filter=id=30051826' )
18
+ . get ( '/v4 /challenges?filter=id=30051826' )
19
19
. reply ( 200 , challengeAPIResponse [ 2 ] )
20
- . get ( '/v3 /challenges?filter=id=31000000' )
20
+ . get ( '/v4 /challenges?filter=id=31000000' )
21
21
. reply ( 200 , challengeAPIResponse [ 3 ] )
22
22
. get ( '/v3/users?filter=id=10000' )
23
23
. reply ( 200 , memberAPIResponse [ 0 ] )
Original file line number Diff line number Diff line change @@ -197,13 +197,10 @@ describe('Topcoder - Leaderboard API E2E Tests', () => {
197
197
id : '161d3655-9c80-4f90-8051-e209e8c21702' ,
198
198
submissionId : '261d3655-9c80-4f90-8051-e209e8c21702' ,
199
199
metadata : {
200
- assertions : {
200
+ tests : {
201
201
pending : 0 ,
202
202
failed : 1 ,
203
203
total : 10
204
- } ,
205
- tests : {
206
- total : 10
207
204
}
208
205
} ,
209
206
score : 90
@@ -360,7 +357,7 @@ describe('Topcoder - Leaderboard API E2E Tests', () => {
360
357
score : 50
361
358
} )
362
359
expect ( res . status ) . to . equal ( 204 )
363
- expect ( debugLogs [ 3 ] ) . to . equal ( 'Group ID of Challenge # 31000000 is not configured for processing!' )
360
+ expect ( debugLogs [ 3 ] ) . to . equal ( 'Group ID ([30000]) of Challenge # 31000000 is not in the configured set of Ids (202343,20000000) configured for processing!' )
364
361
} )
365
362
} )
366
363
@@ -371,13 +368,10 @@ describe('Topcoder - Leaderboard API E2E Tests', () => {
371
368
. send ( {
372
369
id : '361d3655-9c80-4f90-8051-e209e8c21701' ,
373
370
metadata : {
374
- assertions : {
371
+ tests : {
375
372
pending : 0 ,
376
373
failed : 1 ,
377
374
total : 5
378
- } ,
379
- tests : {
380
- total : 5
381
375
}
382
376
} ,
383
377
score : 80
@@ -393,7 +387,8 @@ describe('Topcoder - Leaderboard API E2E Tests', () => {
393
387
handle : 'TonyJ' ,
394
388
aggregateScore : 80 ,
395
389
testsPassed : 4 ,
396
- totalTestCases : 5
390
+ totalTestCases : 5 ,
391
+ scoreLevel : 'up'
397
392
} )
398
393
} )
399
394
Original file line number Diff line number Diff line change @@ -157,13 +157,10 @@ describe('Topcoder - Leaderboard API Unit Tests', () => {
157
157
id : '161d3655-9c80-4f90-8051-e209e8c21702' ,
158
158
submissionId : '261d3655-9c80-4f90-8051-e209e8c21702' ,
159
159
metadata : {
160
- assertions : {
160
+ tests : {
161
161
pending : 0 ,
162
162
failed : 1 ,
163
163
total : 10
164
- } ,
165
- tests : {
166
- total : 10
167
164
}
168
165
} ,
169
166
score : 90
@@ -310,7 +307,7 @@ describe('Topcoder - Leaderboard API Unit Tests', () => {
310
307
submissionId : '261d3655-9c80-4f90-8051-e209e8c21707' ,
311
308
score : 50
312
309
} )
313
- expect ( debugLogs [ 3 ] ) . to . equal ( 'Group ID of Challenge # 31000000 is not configured for processing!' )
310
+ expect ( debugLogs [ 3 ] ) . to . equal ( 'Group ID ([30000]) of Challenge # 31000000 is not in the configured set of Ids (202343,20000000) configured for processing!' )
314
311
} )
315
312
} )
316
313
@@ -319,13 +316,10 @@ describe('Topcoder - Leaderboard API Unit Tests', () => {
319
316
const result = await service . updateLeaderboard ( '30051825' , '8547899' , {
320
317
id : '361d3655-9c80-4f90-8051-e209e8c21701' ,
321
318
metadata : {
322
- assertions : {
319
+ tests : {
323
320
pending : 0 ,
324
321
failed : 1 ,
325
322
total : 5
326
- } ,
327
- tests : {
328
- total : 5
329
323
}
330
324
} ,
331
325
score : 80
@@ -339,7 +333,8 @@ describe('Topcoder - Leaderboard API Unit Tests', () => {
339
333
handle : 'TonyJ' ,
340
334
aggregateScore : 80 ,
341
335
testsPassed : 4 ,
342
- totalTestCases : 5
336
+ totalTestCases : 5 ,
337
+ scoreLevel : 'up'
343
338
} )
344
339
} )
345
340
You can’t perform that action at this time.
0 commit comments