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

Update Reports for V2 Test Format #845

Merged
merged 4 commits into from
Nov 29, 2023

Conversation

howard-e
Copy link
Contributor

@howard-e howard-e commented Nov 16, 2023

See #744. Based on #840.

This PR does the following:

Add the string "Test TEST_NUMBER: " to the beginning of the heading text.

The other items seem to already be addressed.

@howard-e howard-e marked this pull request as draft November 20, 2023 13:54
@howard-e howard-e force-pushed the v2-test-format-reports branch from 1f67191 to 1f797df Compare November 20, 2023 13:56
@howard-e howard-e marked this pull request as ready for review November 20, 2023 14:19
Copy link
Contributor

@alflennik alflennik left a comment

Choose a reason for hiding this comment

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

I left a couple of comments but generally looks good. I'm currently working out a way to run this code so stand by for any feedback that comes from when I do that.

return (
<>
{isReportsPage ? <h3>Results for each command</h3> : null}
Copy link
Contributor

Choose a reason for hiding this comment

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

If this headline is not always needed maybe it's a sign it doesn't belong in this component and can be handled by the parent component.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good point, addressed in 9eb5875.

{passedAssertions.length} passed,&nbsp;
{failedAssertions.length} failed
</h3>
{isReportsPage ? (
Copy link
Contributor

Choose a reason for hiding this comment

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

Instead of changing the behavior based on an isReportsPage prop, which is difficult to understand without delving in here, maybe we can add a headingLevel={3} prop. It would work like this ...

const Header = `h${headingLevel}`

return (
  // ...
  <Header>
    Header content
  </Header>
)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks for that, been seeing this sprinkled around! We could make general component for this pattern now. Also updated in 9eb5875.

Copy link
Contributor

@stalgiag stalgiag left a comment

Choose a reason for hiding this comment

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

Able to test locally with no issues. The code looks good to me. Thanks @howard-e !

@howard-e howard-e force-pushed the support-v2-test-format branch from 133ed89 to 8dd8119 Compare November 27, 2023 15:27
@howard-e howard-e force-pushed the v2-test-format-reports branch from 08194df to 38bec5f Compare November 27, 2023 20:14
@howard-e howard-e merged commit ab9a597 into support-v2-test-format Nov 29, 2023
2 checks passed
@howard-e howard-e deleted the v2-test-format-reports branch November 29, 2023 17:27
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.

3 participants