diff --git a/utils/flakiness-dashboard/processing/dashboard_compressed_v1.js b/utils/flakiness-dashboard/processing/dashboard_compressed_v1.js index 6d94d89e7b..4718226848 100644 --- a/utils/flakiness-dashboard/processing/dashboard_compressed_v1.js +++ b/utils/flakiness-dashboard/processing/dashboard_compressed_v1.js @@ -64,7 +64,7 @@ function compressReports(reports) { let specObject = specs.get(specId); if (!specObject) { specObject = { - title: spec.title, + title: spec.titlePath.join(' › '), line: spec.line, column: spec.column, tests: new Map(), diff --git a/utils/flakiness-dashboard/processing/utils.js b/utils/flakiness-dashboard/processing/utils.js index d0e8dc6204..5bc6888a8f 100644 --- a/utils/flakiness-dashboard/processing/utils.js +++ b/utils/flakiness-dashboard/processing/utils.js @@ -22,13 +22,17 @@ const gunzipAsync = util.promisify(zlib.gunzip); const blobServiceClient = BlobServiceClient.fromConnectionString(process.env.AzureWebJobsStorage); -function flattenSpecs(suite, result = []) { +function flattenSpecs(suite, result = [], titlePaths = []) { if (suite.suites) { - for (const child of suite.suites) - flattenSpecs(child, result); + for (const child of suite.suites) { + const isFileSuite = child.column === 0 && child.line === 0; + flattenSpecs(child, result, (!isFileSuite && child.title) ? [...titlePaths, child.title]: titlePaths); + } } - for (const spec of suite.specs || []) + for (const spec of suite.specs || []) { + spec.titlePath = [...titlePaths, spec.title]; result.push(spec); + } return result; }