protractor-beautiful-reporter icon indicating copy to clipboard operation
protractor-beautiful-reporter copied to clipboard

Feature Request: Multi-line test name in report

Open RonanCodes opened this issue 6 years ago • 3 comments

The newline character: \n shows in the terminal but not in the e2e report.

My test:

        fit('Given I open a tab\nThen the header is correct\nAnd the background is blue', () => {
            ...
        });

It would be great if we could add formatting options into the UI.

RonanCodes avatar Nov 09 '18 15:11 RonanCodes

Any update on this? Essentially when we generate the report we want to turn the \n into a new line instead of just removing it.

RonanCodes avatar Feb 20 '19 11:02 RonanCodes

@RonanC The addition of the following inline css to the configuration will format newline characters to line wraps in the report:

new HtmlReporter({
            baseDirectory: 'reports-tmp',
            customCssInline:`
.mediumColumn:not([ng-class]) {
    white-space: pre-wrap;
}
`}
)

miller45 avatar Aug 16 '19 12:08 miller45

@RonanC I just tried it out: It seems to works also for specs or testcases (now) when you add more css. It is described here in the wiki under inebreaks in specs or testcase

miller45 avatar Aug 16 '19 13:08 miller45