Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Embedded data fails to display in HTML reports due to invalid string passed from HTMLFormatter #412

Closed
cpkelley opened this Issue · 2 comments

3 participants

@cpkelley

Using Cucumber-jvm 1.1.1, screenshots are not getting embedded into the HTML report. It appears that something is converting the embedding parameter string incorrectly.

 public void embedding(String mimeType, byte[] data) {
        // Creating a file instead of using data urls to not clutter the js file
        String extension = MIME_TYPES_EXTENSIONS.get(mimeType);
        if (extension != null) {
            StringBuilder fileName = new StringBuilder("embedded").append(embeddedIndex++).append(".").append(extension);
            writeBytesAndClose(data, reportFileOutputStream(fileName.toString()));
            writeToJsReport("embedding", new StringBuilder("'").append(mimeType).append("','").append(fileName).append("'").toString());
        }
    }

Current Output in Report.js:

formatter.embedding("\u0027image/png\u0027,\u0027embedded0.png\u0027");

Expected Result:

formatter.embedding("image/png","embedded0.png");
or
formatter.embedding('image/png','embedded0.png');
@tsuhachev

hi
when can I expect the fix?

@aslakhellesoy

After I have reviewed your pull request and verified that it fixes the bug.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.