Skip to content

Conversation

@davidjgoss
Copy link
Contributor

@davidjgoss davidjgoss commented Nov 15, 2025

🤔 What's changed?

By default, omit hook steps when rendering a test case outcome unless the hook has a non-success status. Also, provide a button to reveal them.

Screen.Recording.2025-11-15.at.11.48.17.mov

⚡️ What's your motivation?

Fixes #414.

🏷️ What kind of change is this?

  • ⚡ New feature (non-breaking change which adds new behaviour)

♻️ Anything particular you want feedback on?

This implementation shows any non-successful hooks by default. That would include skipped hooks. Do we want that, or should be just show failed hooks by default? There are conflicting use cases here:

  • If a hook is skipped because an earlier step failed, that is not very interesting by default
  • If the code of a given hook declares itself skipped and causes all subsequent steps (and the scenario overall) to be skipped, we might prefer to show that by default

📋 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.

@netlify
Copy link

netlify bot commented Nov 15, 2025

Deploy Preview for cucumber-react-preview ready!

Name Link
🔨 Latest commit d47e4af
🔍 Latest deploy log https://app.netlify.com/projects/cucumber-react-preview/deploys/691c2a8d0774770008b39a54
😎 Deploy Preview https://deploy-preview-415--cucumber-react-preview.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@davidjgoss davidjgoss marked this pull request as ready for review November 15, 2025 11:49
@mpkorstanje
Copy link
Contributor

mpkorstanje commented Nov 17, 2025

The ideal solution would be to show only hooks that are not (passed, skipped). And the first hook that is skipped, and preceeded by a passing hook or step.

@davidjgoss
Copy link
Contributor Author

And the first hook that is skipped, and preceeded by a passing hook or step.

Or indeed is not preceded by any step (skip on first hook). That should be doable.

Copy link
Contributor

@mpkorstanje mpkorstanje left a comment

Choose a reason for hiding this comment

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

Nitpick aside.

@mpkorstanje mpkorstanje merged commit 1d2d33c into main Nov 18, 2025
6 checks passed
@mpkorstanje mpkorstanje deleted the collapse-green-hooks branch November 18, 2025 11:10
@mpkorstanje
Copy link
Contributor

Btw, I really like the new section in the preview with all the CKK examples!

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.

Reduce noise from uneventful hooks

2 participants