Shelex / cypress-allure-plugin

cypress plugin to use allure reporter api in tests

Home Page:https://shelex.github.io/cypress-allure-plugin-example/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Skipped tests are shown in the report with allureClearSkippedTests=true

YarLyashenko opened this issue · 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;
}
);

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!