XCTestHTMLReport
XCTestHTMLReport copied to clipboard
Line breaks in results
We connected gmock framework to XCTest and it represents error with line breaks and sometimes with call stack, for example:
AngleTest.cpp:25: error: -[Angle::angle_values_are_consistent] : Expected: angle_deg + 100 Which is: -300 To be equal to: deg->get_degrees() Which is: -400
We see such representation in xcode's log, in terminal and even in XCTestHTMLReport's log tab. But by some reason not on main page. Main page doesn't represent line breaks and we see it like this:
Assertion Failure: AngleTest.cpp:25: Expected: angle_deg + 100 Which is: -300 To be equal to: deg->get_degrees() Which is: -400 (0s)
Especially it's sad when there is a call stack.
Is there any way to represent the result on main page with line breaks as well?
Hi. I'm very glad that project is alive again.
Unfortunately this issue is not fixed yet.
Locally I've fixed it with adding white-space: pre-wrap;
to activity-assertion-failure
Like:
.activity.activity-assertion-failure > p {
color: red;
white-space: pre-wrap;
}
Not sure how correct this fix
Thanks @Hsilgos ! I added your suggested change to #297. Feel free to take a look and I'd be happy to merge it in.
Hi, @tylervick
After short usage I've encountered a small problem. This style is applied to both elements: cell with arrow and detailed description. As result it looks like on screenshot. It's ok for our project as quick workaround, but probably should be improved for perfect solution. I'll try my idea with additional style soon and return with feedback here.
