Skip to content

Commit c592417

Browse files
authored
Merge pull request #25 from edcdavid/new-claim-format
Support for new claim format
2 parents 7cb5b4a + 7e88fe9 commit c592417

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

html/index.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/* global $ */
22
/* global initialjson, feedback, AnsiUp, dayjs, FileReader, MouseEvent, HTMLAnchorElement */
3-
const expectedClaimVersion = 'v0.1.0'
3+
const expectedClaimVersion = 'v0.2.0'
44
let isResultTabActive = false
55
let claimGlobal
66
let feedbackGlobal
@@ -252,7 +252,7 @@ function getTestCaseStats (claimJson, tableName) {
252252
let testsAbortedOptional = 0
253253
// Compute number of passed/skipped/failed results
254254
for (const testIdFromClaim in claimJson) {
255-
const currentTestResult = claimJson[testIdFromClaim][0]
255+
const currentTestResult = claimJson[testIdFromClaim]
256256
let mandatoryOptional = currentTestResult.categoryClassification.FarEdge
257257

258258
if (tableName === 'telco') {
@@ -403,8 +403,8 @@ function generateTestcaseSingleResultElement (currentTestResult, tableName, id,
403403
function fillResults (claimJson, mandatoryTableElement, optionalTableElement, tableName) {
404404
// sorting according to state
405405
const sortedClaimJson = Object.entries(claimJson).sort(function (a, b) {
406-
const stringA = a[1][0].testID.id + a[1][0].state
407-
const stringB = b[1][0].testID.id + b[1][0].state
406+
const stringA = a[1].testID.id + a[1].state
407+
const stringB = b[1].testID.id + b[1].state
408408
return stringA.localeCompare(stringB)
409409
})
410410
const sortedClaimJsonObj = Object.fromEntries(sortedClaimJson)
@@ -415,7 +415,7 @@ function fillResults (claimJson, mandatoryTableElement, optionalTableElement, ta
415415

416416
let id = 1
417417
for (const testIdFromSortedClaim in sortedClaimJsonObj) {
418-
const currentTestResult = claimJson[testIdFromSortedClaim][0]
418+
const currentTestResult = claimJson[testIdFromSortedClaim]
419419
let mandatoryOptional = currentTestResult.categoryClassification.FarEdge
420420

421421
if (tableName === 'telco') {

0 commit comments

Comments
 (0)