{"action":"created","issue":{"url":"https://api.github.com/repos/webdriverio/wdio-allure-reporter/issues/98","repository_url":"https://api.github.com/repos/webdriverio/wdio-allure-reporter","labels_url":"https://api.github.com/repos/webdriverio/wdio-allure-reporter/issues/98/labels{/name}","comments_url":"https://api.github.com/repos/webdriverio/wdio-allure-reporter/issues/98/comments","events_url":"https://api.github.com/repos/webdriverio/wdio-allure-reporter/issues/98/events","html_url":"https://github.com/webdriverio/wdio-allure-reporter/issues/98","id":301365941,"number":98,"title":"Impossible to attach image as an attachment to a test case","user":{"login":"anto-wahanda","id":30859172,"avatar_url":"https://avatars0.githubusercontent.com/u/30859172?v=4","gravatar_id":"","url":"https://api.github.com/users/anto-wahanda","html_url":"https://github.com/anto-wahanda","followers_url":"https://api.github.com/users/anto-wahanda/followers","following_url":"https://api.github.com/users/anto-wahanda/following{/other_user}","gists_url":"https://api.github.com/users/anto-wahanda/gists{/gist_id}","starred_url":"https://api.github.com/users/anto-wahanda/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/anto-wahanda/subscriptions","organizations_url":"https://api.github.com/users/anto-wahanda/orgs","repos_url":"https://api.github.com/users/anto-wahanda/repos","events_url":"https://api.github.com/users/anto-wahanda/events{/privacy}","received_events_url":"https://api.github.com/users/anto-wahanda/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2018-03-01T11:12:37Z","updated_at":"2018-03-01T12:37:43Z","closed_at":null,"author_association":"NONE","body":"# Description of the issue\r\n\r\nWhen trying to add an image as attachment to the report for a test case using `reporter.createAttachment()`, an attachment is added to the xml report, but \r\n\r\n- the image generated and saved in the allure results folder cannot be open\r\n- the attachment does not have a specified size, hence the report cannot be generated\r\n\r\n# Steps to reproduce\r\n\r\n1. Clone the repo with a prepared example: https://github.com/anto-wahanda/wdio-allure-attachment-issue\r\n2. `npm run`, `npm test` and `npm run allure` (if you want to attempt generating the report)\r\n\r\n# Actual result\r\n\r\nGenerated PNG cannot be open, attachment in the xml suite result file does not have a size, report cannot be generated.\r\n(NOTE: the attachment generated when invoking `browser.screenshot()` is correctly attached to the xml result file under its own step)\r\n\r\n# Expected result\r\n\r\nPNG file should be saved correctly (i.e. you should be able to open it), generated report should show the attachment and image should be visible within the report."},"comment":{"url":"https://api.github.com/repos/webdriverio/wdio-allure-reporter/issues/comments/369578743","html_url":"https://github.com/webdriverio/wdio-allure-reporter/issues/98#issuecomment-369578743","issue_url":"https://api.github.com/repos/webdriverio/wdio-allure-reporter/issues/98","id":369578743,"user":{"login":"BorisOsipov","id":6514276,"avatar_url":"https://avatars0.githubusercontent.com/u/6514276?v=4","gravatar_id":"","url":"https://api.github.com/users/BorisOsipov","html_url":"https://github.com/BorisOsipov","followers_url":"https://api.github.com/users/BorisOsipov/followers","following_url":"https://api.github.com/users/BorisOsipov/following{/other_user}","gists_url":"https://api.github.com/users/BorisOsipov/gists{/gist_id}","starred_url":"https://api.github.com/users/BorisOsipov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BorisOsipov/subscriptions","organizations_url":"https://api.github.com/users/BorisOsipov/orgs","repos_url":"https://api.github.com/users/BorisOsipov/repos","events_url":"https://api.github.com/users/BorisOsipov/events{/privacy}","received_events_url":"https://api.github.com/users/BorisOsipov/received_events","type":"User","site_admin":false},"created_at":"2018-03-01T12:37:43Z","updated_at":"2018-03-01T12:37:43Z","author_association":"CONTRIBUTOR","body":"@anto-wahanda good questions. \r\n>what would type be in that context?\r\nWe need to pass type. it will be requered field.\r\nNow I don't have time to go deeper and answer.\r\n\r\n>Should it always be 'base64'?\r\nMaybe. I don't know are there any problem with reading base64 from unknown source.\r\nI can advice to look how allure recognize mime type \r\nhttps://github.com/allure-framework/allure-js-commons/blob/master/util.js\r\n\r\nAlso, should createAttachment take a base64 encoded string then?\r\nNo. If we make type required."}}
{"actor":{"display_login":"BorisOsipov"}}