You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the multiple-cucumber-html-reporter library code, if I comment the base64 conversion as shown below, the generated report shows the correct plain text.
Environment (please complete the following information)
Config of multiple-cucumber-html-reporter
{
jsonDir: './dashboard/e2e-tests/multireport/',
reportPath: './dashboard/e2e-tests/multireport/',
reportName: 'Automation Report',
pageTitle: 'Automation Report',
displayDuration: true
}
Describe the bug
Plain text attached to cucumber JSON is shown as junk characters in the multiple cucumber html report
When the plain text is attached to the scenario world object as shown below, multiple cucumber html report shows it as junk characters.
// Reference Code: https://github.com/cucumber/cucumber-js/blob/main/docs/support_files/attachments.md
After(function () {
this.attach('Some text');
});
In the multiple-cucumber-html-reporter library code, if I comment the base64 conversion as shown below, the generated report shows the correct plain text.
../node_modules/multiple-cucumber-html-reporter/lib/generate-report.js
function _parseSteps(scenario) {
scenario.steps.forEach((step) => {
if (step.embeddings !== undefined) {
step.attachments = [];
step.embeddings.forEach((embedding, embeddingIndex) => {
/* Decode Base64 for Text-ish attachements */
if(
embedding.mime_type === 'text/html' ||
embedding.mime_type === 'text/plain'
) {
// embedding.data = Buffer.from(embedding.data.toString(), 'base64'). //-------> Comment this
}
The text was updated successfully, but these errors were encountered: