Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Skipped tests are shown in the report with allureClearSkippedTests=true #229

Open
YarLyashenko opened this issue Mar 15, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@YarLyashenko
Copy link

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 YarLyashenko added the bug Something isn't working label Mar 15, 2024
Shelex pushed a commit that referenced this issue Mar 15, 2024
@Shelex
Copy link
Owner

Shelex commented Mar 15, 2024

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants