cypress-allure-plugin icon indicating copy to clipboard operation
cypress-allure-plugin copied to clipboard

Skipped tests are shown in the report with allureClearSkippedTests=true

Open YarLyashenko opened this issue 1 year ago • 1 comments

Skipped tests are shown in the report with allureClearSkippedTests=true.

I also use custom defineHistoryId() function.

I see root cause in writer/results.js#writeTests function. allureMapping I see is an object where values are arrays, not a simple object. Therefore mochaID will always be undefined: const mochaID = Object.keys(allureMapping).find( (id) => allureMapping[id].allureId === test.uuid );

Not sure why there is an array, but such case can be covered as well: const mochaID = Object.keys(allureMapping).find( (id) => { if (Array.isArray(allureMapping[id])) { return allureMapping[id].find(e => e.allureId === test.uuid); } return allureMapping[id].allureId === test.uuid; } );

YarLyashenko avatar Mar 15 '24 13:03 YarLyashenko

Hi @YarLyashenko Great catch!

It was changed when retries handling was added, so this is basically an array of attempts. And you are correct that if mochaID is undefined, we do not remove it from mapping when allureClearSkippedTests is specified, so skipped tests are not ignored.

Thank you for your contribution!

Shelex avatar Mar 15 '24 19:03 Shelex