Open Jazzman82 opened 2 years ago
This could be achieved by adding white-space: pre-wrap
CSS property to the error-content
class.
Although I think the LivingDoc generator may be closed source? So there might not be an opportunity to implement a fix unless a someone with access can add the property.
Awesome @BL323! I will try to get this small fix into LivingDoc. Warning: It could take a while, next release is planned when we release SpecFlow 3.10.
Sounds good, thanks!
SpecFlow Version
3.9.40 (Specflow), 3.9.57 (LivingDocPlugin)
Which test runner are you using?
NUnit
Test Runner Version Number
Rider Testrunner (2021.3 EAP 10), dotnet test (net6)
.NET Implementation
.NET 5.0
Project Format of the SpecFlow project
Sdk-style project format
.feature.cs files are generated using
SpecFlow.Tools.MsBuild.Generation NuGet package
Test Execution Method
Command line – PLEASE SPECIFY THE FULL COMMAND LINE
SpecFlow Section in app.config or content of specflow.json
No response
Issue Description
Commandline to execute tests:
dotnet test
Commandline to generate LivingDoc:
livingdoc test-assembly DataGatewayServiceTests.dll -t TestExecution.json
Steps to Reproduce
Create a test which fails with a multiline error-message (e.g. some FluentAssertions-Output on collection-comparison)
This produces output similar to this: ` -> error: Expected property actualTree!.Variables[0].ChildSymbols to be a collection with 2 item(s), but found an empty collection. Expected property actualTree!.Variables[1].ChildSymbols to be a collection with 2 item(s), but found an empty collection.
With configuration:
In the LivingDoc.html, the message is displayed like this:![image](https://user-images.githubusercontent.com/13561427/144383629-8f6c114b-7a2d-4a87-8365-b7167b194dc3.png)
It would be nice, if the message respects the line breaks like the output on console.
Link to Repro Project
No response