cucumber / react-components

React components for Cucumber
MIT License
32 stars 10 forks source link

feat: support TestStepResult.exception #345

Closed davidjgoss closed 5 months ago

davidjgoss commented 5 months ago

πŸ€” What's changed?

This PR adds support in the components for an exception object within the TestStepResult. This is designed to give more structured information about a problem than the flat string message field. We'll now use the exception (and disregard the old message field) if present.

image

⚑️ What's your motivation?

Make use of the structured exception object for Cucumber implementations that support it, whilst maintaining backwards-compatibility with those that don't yet.

🏷️ What kind of change is this?

πŸ“‹ Checklist:


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

netlify[bot] commented 5 months ago

Deploy Preview for cucumber-react-components ready!

Name Link
Latest commit 0938b4c1372499f805d37c18c9acd253fe96db91
Latest deploy log https://app.netlify.com/sites/cucumber-react-components/deploys/65f42e87f4c83e0008909142
Deploy Preview https://deploy-preview-345--cucumber-react-components.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 site configuration.

mpkorstanje commented 5 months ago

The "with stacktrace" step fails in the preview with;

TypeError Cannot read properties of null (reading 'type')
    at TodosPage.addItem (/Users/somebody/Projects/my-project/support/pages/TodosPage.ts:39:21)
    at processTicksAndRejections (node:internal/process/task_queues:95:5)
    at CustomWorld.<anonymous> (/Users/somebody/Projects/my-project/support/steps/steps.ts:20:5)
davidjgoss commented 5 months ago

@mpkorstanje thats the actual presentation, not an error when trying to render.

luke-hill commented 5 months ago

Might need some support here as this now means the ruby side renders a shorter message than previously before. All stacktrace data is now missing

Will chat to you later about this @davidjgoss