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

allow showing detail of every example, simplify examples table #159

Merged
merged 22 commits into from
May 24, 2022

Conversation

davidjgoss
Copy link
Contributor

@davidjgoss davidjgoss commented Apr 26, 2022

🤔 What's changed?

This PR makes it so that:

  • Examples tables in a report just show the cells and overall status for each example row (i.e. we don't try to show attachments or errors)
  • Clicking an example row will show the detail of that example, specifically:
    • Example name after templating done
    • Step names after templating done
    • Doc strings after templating done
    • Data tables after templating done
    • Statuses
    • Attachments
    • Errors

image

image

This is achieved by optionally passing a pickle to the GherkinSteps - if present then data and results will be scoped to this rather than aggregated from all matching pickles.

⚡️ What's your motivation?

Fixes #79. Fixes #77.

This ability to separate the individual pickles and their results from an outline will also allow us to start exposing the retry concept in #75.

🏷️ What kind of change is this?

  • 🏦 Refactoring/debt/DX (improvement to code design, tooling, documentation etc. without changing behaviour)
  • ⚡ New feature (non-breaking change which adds new behaviour)
  • 💥 Breaking change (incompatible changes to the API)

♻️ Anything particular you want feedback on?

The visual design and UX. Clicking the rows to drill down makes sense but isn't very obvious. Maybe a little button at the end of the row as well?

Also, this is a breaking change in part because the name and shape of some components has changed:

  • HookList -> HookSteps
  • StepList -> GherkinSteps

There's then a new component StepsList which is purely the <ol> with styling - previously the styles for this were split across Background and Scenario.

@aslakhellesoy not sure how its used in other tools but I don't see much utility in GherkinSteps (formerly called StepList) from being customisable - it really just loops over the steps and renders a GherkinStep for each one, no presentational stuff of its own. Does this need to be customisable?

Also worth saying this isn't going to be any more helpful than before if the failure is in a background step. We could also include the background steps in the detail if we wanted though.

📋 Checklist:

  • I agree to respect and uphold the Cucumber Community Code of Conduct
  • I've changed the behaviour of the code
    • I have added/updated tests to cover my changes.
  • My change requires a change to the documentation.
    • I have updated the documentation accordingly.
  • Users should know about my change
    • I have added an entry to the "Unreleased" section of the CHANGELOG, linking to this pull request.

This text was originally generated from a template, then edited by hand. You can modify the template here.

@davidjgoss davidjgoss marked this pull request as ready for review April 29, 2022 08:59
Copy link
Contributor

@aurelien-reeves aurelien-reeves left a comment

Choose a reason for hiding this comment

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

I do not have a big knowledge of that code base
From what I can see, it looks good

Just missing an entry in the changelog, and maybe an update of the readme :)

Copy link
Contributor

@aurelien-reeves aurelien-reeves left a comment

Choose a reason for hiding this comment

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

Looks good to me :)

@davidjgoss davidjgoss merged commit 43f34d7 into main May 24, 2022
@davidjgoss davidjgoss deleted the feat/example-drilldown branch May 24, 2022 08:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants