diff --git a/packages/driver/cypress/e2e/cypress/log.cy.js b/packages/driver/cypress/e2e/cypress/log.cy.js
index c534282bd670..f548b7c9eb1a 100644
--- a/packages/driver/cypress/e2e/cypress/log.cy.js
+++ b/packages/driver/cypress/e2e/cypress/log.cy.js
@@ -53,6 +53,13 @@ describe('src/cypress/log', function () {
expect(this.cy.createSnapshot).not.to.be.called
expect(result).to.equal(log)
})
+
+ it('line break persists in snapshot', function () {
+ const log = this.log({ 'message': 'First line \n Second Line' })
+ const result = log.snapshot()
+
+ expect(result).to.equal(log)
+ })
})
context('countLogsByTests', () => {
diff --git a/packages/reporter/cypress/e2e/unit/formatted_message.cy.ts b/packages/reporter/cypress/e2e/unit/formatted_message.cy.ts
index 1e541c574e1a..833b1f45fe13 100644
--- a/packages/reporter/cypress/e2e/unit/formatted_message.cy.ts
+++ b/packages/reporter/cypress/e2e/unit/formatted_message.cy.ts
@@ -32,6 +32,6 @@ describe('formattedMessage', () => {
const specialMessage = 'hello\n world `code block`'
const result = formattedMessage(specialMessage)
- expect(result).to.equal('hello\n world code block
')
+ expect(result).to.equal('hello
\n world code block
')
})
})
diff --git a/packages/reporter/src/commands/command.tsx b/packages/reporter/src/commands/command.tsx
index 0578c4c7d149..d73d35410bb2 100644
--- a/packages/reporter/src/commands/command.tsx
+++ b/packages/reporter/src/commands/command.tsx
@@ -24,7 +24,7 @@ import HiddenIcon from '-!react-svg-loader!@packages/frontend-shared/src/assets/
import PinIcon from '-!react-svg-loader!@packages/frontend-shared/src/assets/icons/object-pin_x16.svg'
import RunningIcon from '-!react-svg-loader!@packages/frontend-shared/src/assets/icons/status-running_x16.svg'
-const md = new Markdown()
+const md = new Markdown({ breaks: true })
const displayName = (model: CommandModel) => model.displayName || model.name
const nameClassName = (name: string) => name.replace(/(\s+)/g, '-')