-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Missing content encoding for attachments in JSON reports #2260
Comments
For reference, cucumber-json-formatter will take attachments with |
Okay, that seems like the canonical behaviour we should follow then. |
Excellent, I'll attempt to create a PR 👍 |
This would however mean that string attachments, as they were attached pre #1552, would suddenly appear as base64-encoded data in JSON reports. Thus making this seem like a breaking change. Is that relevant in any way? |
Yep, I think it's a breaking change. We have the end of life for Node.js 14 coming up at the end of April so we could do a major release then with both in. |
Note that this was actually a breaking change. We attach Playwright screenshots to the JSON for our HTML reports, base64 encoding before attaching. Very confused when there appeared to be a double Base64 encode going on! lol |
@v-mwalk, you’re right that it’s a breaking change. The previous conversation also supports this. I think the only mistake made is that it wasn’t mentioned as such in the release notes. |
👓 What did you see?
Consider the following code adding two string attachments:
This will create two envelopes (messages) with different
contentEncoding
(IDENTITY
andBASE64
respectively). However, this information (content encoding) is lost in the JSON report and the original data cannot be reproduced with certainty.Below is the JSON report:
✅ What did you expect to see?
I guess for JSON reports to either only ever contain base64 encoded data or for content encoding to be propagated to the report.
📦 Which tool/library version are you using?
🔬 How could we reproduce it?
Steps to reproduce the behavior:
git clone https://github.com/badeball/cucumber-reproducible-issues.git
cd cucumber-reproducible-issues/string-attachment-ambiguity
npm install
npx cucumber-js
The text was updated successfully, but these errors were encountered: