devops: fix parameterised tests on flakiness dashboard (#24486)
Fixes https://github.com/microsoft/devops.playwright.dev/issues/2
This commit is contained in:
Родитель
1277ec9900
Коммит
c6a0e5d02c
|
@ -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(),
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче