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

feat: Add report section summarizing failing assertions from all tests in a plan #1288

Merged
merged 19 commits into from
Feb 4, 2025

Conversation

stalgiag
Copy link
Contributor

see #1253

This PR adds a report table summarizing all failing assertions to the Candidate Review and on Report pages.

There were a number of design and user experience decisions made here that I especially welcome feedback on. There were also a few decisions for which I was on the fence. Namely:

  • Whether to keep the FailingAssertionsSummaryTable in a Disclosure. Sometimes the table can be quite large.
  • Whether the Candidate Review page should start on the summary page or if it should continue to use the first test as a starting view. I opted for the latter but there is value in both.

@stalgiag stalgiag changed the title Add report section summarizing failing assertions from all tests in a plan feat: Add report section summarizing failing assertions from all tests in a plan Dec 18, 2024
@stalgiag stalgiag requested a review from howard-e December 18, 2024 16:34
Copy link
Contributor

@howard-e howard-e left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @stalgiag! Very impressive getting all this added and in a pretty maintainable way as well given where it has to be referenced.

The main issue I've come across is the handling of the priority 0 assertions but I left some inline suggestions on that. Seems this is all very close!

client/hooks/useFailingAssertions.js Outdated Show resolved Hide resolved
return (
<>
<p>
{metrics.assertionsFailedCount} assertions failed for{' '}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
{metrics.assertionsFailedCount} assertions failed for{' '}
{failingAssertions.length} assertions failed for{' '} // or metrics.mustAssertionsFailedCount + metrics.shouldAssertionsFailedCount

metrics.assertionsFailedCount would also cover the MAY assertions which isn't wanted here.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe this is addressed by 79adb6d

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe this is addressed by 79adb6d

@stalgiag the underlying calculation is correct but the result of it isn't being used here. This suggestion should still be done because the MAY assertions from the overall getMetrics calculation is still being counted in it.

It makes it confusing when the result table only has 14 rows but the text notes 24 assertions failed for x commands in y tests

Copy link
Contributor Author

@stalgiag stalgiag Jan 30, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah yes! Apologies. Brain fog must've been in charge that day. Thanks for sticking to your point 😅

72ba042

client/components/TestRun/TestRun.css Show resolved Hide resolved
client/components/TestRun/TestNavigator.jsx Outdated Show resolved Hide resolved
client/components/common/proptypes/index.js Show resolved Hide resolved
@stalgiag stalgiag requested a review from howard-e January 22, 2025 21:23
Copy link
Contributor

@howard-e howard-e left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@stalgiag the changes look good! I still have one pressing concern I left inline: #1288 (comment)

Looks good to go for me after.

Also, I'm realizing that my previous concern in our discussion from this thread may just have to do with the structure of the sentence. x assertions failed ACROSS y commands in z tests feels better to me. But once again, maybe it's just my understanding being slightly off. But something to think on if it's raised in the future

@stalgiag
Copy link
Contributor Author

@stalgiag the changes look good! I still have one pressing concern I left inline: #1288 (comment)

Looks good to go for me after.

Also, I'm realizing that my previous concern in our discussion from this thread may just have to do with the structure of the sentence. x assertions failed ACROSS y commands in z tests feels better to me. But once again, maybe it's just my understanding being slightly off. But something to think on if it's raised in the future

I agree with "across" feeling better. I took the liberty of changing it 😄 72ba042

@stalgiag stalgiag requested a review from howard-e January 30, 2025 22:45
Copy link
Contributor

@howard-e howard-e left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@stalgiag one more inline change suggestion because of some confusion I introduced! 😅

Should be good to go afterwards

client/components/FailingAssertionsSummary/Table.jsx Outdated Show resolved Hide resolved
@stalgiag stalgiag requested a review from howard-e February 4, 2025 18:32
Copy link
Contributor

@howard-e howard-e left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes look good and very exciting! Thanks for working through all the feedback items!

@howard-e howard-e merged commit 46851ce into development Feb 4, 2025
1 check passed
@howard-e howard-e deleted the failing-assertions-table branch February 4, 2025 19:06
howard-e added a commit that referenced this pull request Feb 5, 2025
Create February 4, 2025 Release

Includes the following changes:
* #1302
* #1303
* #1300, addresses #1270
* #1301, addresses #759 (additional documentation to follow)
* #1281, addresses #1241
* #1307
* #1308, addresses w3c/aria-at#1175
* #1309
* #1288, addresses #1253
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants