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

Video Embedding in cucumber json #2637

Open
CPogX opened this issue Dec 19, 2024 · 3 comments
Open

Video Embedding in cucumber json #2637

CPogX opened this issue Dec 19, 2024 · 3 comments
Assignees
Milestone

Comments

@CPogX
Copy link

CPogX commented Dec 19, 2024

Videos are not embedding correctly in the cucumber reports. This is because of how they are embedded into the cucumber json files.

com.intuit.karate.core.Embed has a toMap() function with conditional logic for video/mp4 to to encode the HTML tag and text/html instead of encoding the video and using video/mp4. This works for the HTML reports, but not for the cucumber reports.

Removing the conditional logic for videos, and handling them the same way as every other content type:

map.put("data", this.getBase64());
map.put("mime_type", this.resourceType.contentType);

resolved the issue with the cucumber reports, and the html reports still worked. I have tested with karate-chrome, and using karate.embed. Is there a scenario I am not considering/ can I raise a pr?

@ptrthomas
Copy link
Member

@CPogX possible duplicate of #2121 - do check, but in any case you can go ahead with a PR

@CPogX
Copy link
Author

CPogX commented Dec 19, 2024

@ptrthomas 100% a duplicate. Created pr #2638.

@ptrthomas
Copy link
Member

cc @bischoffdev just FYI

@ptrthomas ptrthomas added this to the 1.5.1 milestone Dec 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants