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
I want to add custom information to my test report, like addAttach for images, I want to be able to add text.
It Will be nice to have a way to expose information to the report like console.log(my_var) but see the result in the HTML report info.
For example, I'm making a test to an API endpoint, my endpoint returns an object with a key {"result":1, ...} in my test y expect the result to be 1 but is my test fails I want to show in the report the response object, to be able to see the error cause.
The text was updated successfully, but these errors were encountered:
You'll be able to achieve what you need with the addAttach() function, by doing the following:
await addAttach('', 'Your Text');
Its not pretty though. I added an addMsg() function in the @carits-qa/jest-html-reporters package and prettified the output a little bit as a temporary solution
Your request is marked as an enhancement so will hopefully be added soon (and I'll bin off my forked repo)
Hey @aruiz-caritsqa
The addMsg function is great, I think you can create a PR adding this function.
Just a little detail if you add a message the info button color should be Light Blue.
I want to add custom information to my test report, like
addAttach
for images, I want to be able to add text.It Will be nice to have a way to expose information to the report like console.log(my_var) but see the result in the HTML report info.
For example, I'm making a test to an API endpoint, my endpoint returns an object with a key
{"result":1, ...}
in my test y expect the result to be 1 but is my test fails I want to show in the report the response object, to be able to see the error cause.The text was updated successfully, but these errors were encountered: