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

add support to display senario.attach('<html-tag/>', 'text/html') #132

Merged
merged 1 commit into from
Feb 6, 2018

Conversation

xywang68
Copy link
Contributor

@xywang68 xywang68 commented Feb 3, 2018

Give I have obtained screenshots.png and/or video.mp4 files in a relative path to the cucumber.json file folder
When I use cucumber.attach() function to attach a HTML tag that reference to the file path
And I use cucumber-html-reporter to generate a cucumber.html report
Then I should see the HTML tag displayed property.

attach HTML tag examples:

After: function(scenario) {
var videoHtmlTag='<video src="Passed_Win7_IE11_Validate_Modifications_Performance.mp4" style="max-width: 100%; height: auto;" controls="" poster="Passed_Win7_IE11_Validate_Modifications_Performance.png">Your browser does not support the video tag.</video>';
var screenShotTag='<img src="Passed_Win7_IE11_Validate_Modifications_Performance.png">';
if (process.env.MOVIE == 1) {
scenario.attach(videoHtmlTag, 'html/text');
} else {
scenario.attach(screenShotTag, 'html/text);
}
},

@gkushang
Copy link
Owner

gkushang commented Feb 6, 2018

Thanks, @xywang68

@gkushang gkushang merged commit 743af2d into gkushang:develop Feb 6, 2018
@gkushang
Copy link
Owner

gkushang commented Feb 6, 2018

@xywang68 it is released with the version @4.0.1. Can you help test the version locally with specifically attaching the video files as text/html, and post the result whenever you do?

Thanks!

@xywang68
Copy link
Contributor Author

xywang68 commented Feb 6, 2018

will do.

@xywang68
Copy link
Contributor Author

xywang68 commented Feb 8, 2018

@xywang68
Copy link
Contributor Author

xywang68 commented Feb 8, 2018

@gkushang ,uploaded test result.

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.

2 participants