From 1b457b1ff87fa2d16fcc04e704408a2dc4a5593f Mon Sep 17 00:00:00 2001 From: Simon Knott Date: Fri, 4 Oct 2024 14:18:38 +0200 Subject: [PATCH] fix(html reporter): render annotation newlines (#32948) Closes https://github.com/microsoft/playwright/issues/32925. Before this change, newlines in annotation descriptions weren't respected. This change makes them shown. Here's how it looks for this annotation: ```ts test.info().annotations.push({ type: 'user story', description: '\n- user goes to the page\n- user clicks the button\n- user sees the result', }); ``` Before: Screenshot 2024-10-04 at 09 55 15 After: Screenshot 2024-10-04 at 09 51 08 --- packages/html-reporter/src/testCaseView.css | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/html-reporter/src/testCaseView.css b/packages/html-reporter/src/testCaseView.css index 90e2f4057b..56be1d9620 100644 --- a/packages/html-reporter/src/testCaseView.css +++ b/packages/html-reporter/src/testCaseView.css @@ -61,6 +61,7 @@ align-items: center; padding: 0 8px; line-height: 24px; + white-space: pre-wrap; } @media only screen and (max-width: 600px) {