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

Support attaching URLs to link to other content #2191

Open
davidjgoss opened this issue Jul 29, 2024 · 0 comments
Open

Support attaching URLs to link to other content #2191

davidjgoss opened this issue Jul 29, 2024 · 0 comments
Assignees

Comments

@davidjgoss
Copy link
Contributor

davidjgoss commented Jul 29, 2024

Problem

In Cucumber, attachments work by providing the attachment content to Cucumber which then includes it in the messages.

But sometimes you might just want to link to content that exists elsewhere but is relevant to this test case/step. Maybe it's a dump of logs, or some screenshots, or something else - anything addressable by a URL. Currently there's no way to do this. The schema for attachments has a url field, but this is intended for externalising regular attachments as a post-processing step (as done in cucumber/html-formatter#281) rather than linking to already-external content.

Proposal

We can use the existing sort-of-standard MIME type text/uri-list for this. The idea is to:

  • Provide a link function in Cucumber implementations that acts as a shorthand for attaching a URL with the above MIME type
  • In formatters - particularly the HTML formatter - render those attachments as a simple link

This is a similar approach to what we've done before with log.

@davidjgoss davidjgoss self-assigned this Jul 29, 2024
mpkorstanje pushed a commit to cucumber/react-components that referenced this issue Aug 2, 2024
Special support for attachments with MIME type text/uri-list, to render as hyperlinks that open in a new tab.

See cucumber/common#2191
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: No status
Development

No branches or pull requests

1 participant