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
/**
*
* Runs before a Cucumber Scenario.
*/
beforeScenario: function (world, context) {
// save scenario start time
cucumberJson.attach('Start Time: ' + new Date().toISOString());
},
Describe the bug
If type is not defined in the brackets as second argument, there is not 'text/plain' in JSON report.
To Reproduce
Steps to reproduce the behavior:
Run any test with cucumberJson.attach('Start Time: ' + new Date().toISOString());
open JSON report - there is not "mime_type": "text/plain" type for Start Time
Expected behavior
JSON report should contain the following if type is not defined:
"embeddings":[{"data":"Scenario Start Time: 2023-05-24T07:40:20.653Z","mime_type":"text/plain"}]}
Any contributions that resolves the bug are highly appreciated. Don't expect this to be picked up by active contributors as they have their own priorities. If you depend on this bug to be fixed, your contribution is required. Please take a look into our contribution guidelines or join our Discord development server and let us know if you have any questions. Cheers!
Environment :
Config of webdriver.io and the reporter
An example of how you configured the reporter in your webdriver.io config
reporters: ['spec','dot', [ 'cucumberjs-json', {
jsonFolder: './reports/json-output-folder',
language: 'en',
}]],
/**
*
* Runs before a Cucumber Scenario.
*/
beforeScenario: function (world, context) {
// save scenario start time
cucumberJson.attach('Start Time: ' + new Date().toISOString());
},
Describe the bug
If type is not defined in the brackets as second argument, there is not 'text/plain' in JSON report.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
JSON report should contain the following if type is not defined:
"embeddings":[{"data":"Scenario Start Time: 2023-05-24T07:40:20.653Z","mime_type":"text/plain"}]}
Additional context
Expected behavior is described here as well: https://github.com/webdriverio-community/wdio-cucumberjs-json-reporter
The text was updated successfully, but these errors were encountered: