fix(summaryReporter): fix report for nested suites #2860
+87
−36
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #2810
What I did
Examples after change
Results when no root suite is defined:
Regular:
![image](https://private-user-images.githubusercontent.com/405347/375644541-f889d2e1-356a-47f9-8d2b-610fa6605fc2.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkzNTc5NDQsIm5iZiI6MTczOTM1NzY0NCwicGF0aCI6Ii80MDUzNDcvMzc1NjQ0NTQxLWY4ODlkMmUxLTM1NmEtNDdmOS04ZDJiLTYxMGZhNjYwNWZjMi5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjUwMjEyJTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI1MDIxMlQxMDU0MDRaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT05M2VkYzFiODAzNThmMjA4Yjc4YWFmODNlOTI1ZjA5OWRjOWJmNmZjYWE0Mzc3MDhjMjMxYzM0MWVlM2QzYTM3JlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCJ9.nxbcq23XjSFnhSzTeayLquXmUeuW4u85pwxFe3FZbT4)
Flatten:
![image](https://private-user-images.githubusercontent.com/405347/375644616-9aaebb0b-bef2-416d-ba15-69c6508c0e18.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkzNTc5NDQsIm5iZiI6MTczOTM1NzY0NCwicGF0aCI6Ii80MDUzNDcvMzc1NjQ0NjE2LTlhYWViYjBiLWJlZjItNDE2ZC1iYTE1LTY5YzY1MDhjMGUxOC5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjUwMjEyJTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI1MDIxMlQxMDU0MDRaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT02Njg0MjQ3NTQ1YWMyODBhODcxN2FhODkxZjMyZWY5MDQwMzJmYmFjNDFkYzM4NzRmZDNkMGY2MTU3ZmE0YzAxJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCJ9.FEfAqlAAwCR99RBbOinnkQtrcuPVWE9UrigthGz_LTI)
Results when root suite is defined:
Regular:
![image](https://private-user-images.githubusercontent.com/405347/375779951-90220c44-d994-4910-b4b9-fc9cb68e83db.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkzNTc5NDQsIm5iZiI6MTczOTM1NzY0NCwicGF0aCI6Ii80MDUzNDcvMzc1Nzc5OTUxLTkwMjIwYzQ0LWQ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U5Yjc0MzUyOTE1NDM2NWQwMjNmMGE3JlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCJ9.zAWrnd4xjwok58slyItSMjgKgFRRcBcwZv2yxYlxTvc)
Flatten:
![image](https://private-user-images.githubusercontent.com/405347/375780278-2bd36e44-b21e-4ed8-9ca3-d3cd90d9530c.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkzNTc5NDQsIm5iZiI6MTczOTM1NzY0NCwicGF0aCI6Ii80MDUzNDcvMzc1NzgwMjc4LTJiZDM2ZTQ0LWIyMWUtNGVkOC05Y2EzLWQzY2Q5MGQ5NTMwYy5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjUwMjEyJTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI1MDIxMlQxMDU0MDRaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT1kNzFmOWY4ZDIzNTBjNGEyMjg2M2RhZmM3MDQyYmZkOTM1MjAzY2ZiM2Q0ODg3YWNkYjUyZWZkNGQwNDk0YTU1JlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCJ9.9UrOr4xTzQZVsFVEW6U8zS0uoTMaVYNijBazipX28CE)
![image](https://private-user-images.githubusercontent.com/405347/375784045-d9304258-a4c1-4b2c-b7b7-2501d0812b7a.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkzNTc5NDQsIm5iZiI6MTczOTM1NzY0NCwicGF0aCI6Ii80MDUzNDcvMzc1Nzg0MDQ1LWQ5MzA0MjU4LWE0YzEtNGIyYy1iN2I3LTI1MDFkMDgxMmI3YS5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjUwMjEyJTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI1MDIxMlQxMDU0MDRaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT1mZjBlNjdjOWViZGQ2ZTg3NTFiN2FhNmViODU5NDFkMjE3NjE2ZmVjMjM5OThmMWQ1NDc2NDE2Yjk4Zjg4ZGMxJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCJ9.KGwIikiVQKz56pk8aOSPiTHdMLp_zuLioKhGssBulsY)
PS: extra indentation on failed test is associated to the usage of "aegean check mark (U+10102)". Not sure if working as expected or bug. I left is AS-IS.