Skip to content

Commit

Permalink
Potential Fix for #7152 (Slate crashing) (#7153)
Browse files Browse the repository at this point in the history
* Potential Fix for #7152

* fix: update e2e tests for soft breaks

---------

Co-authored-by: Anze Demsar <anze.demsar@p-m.si>
  • Loading branch information
DavidWells and demshy committed Mar 28, 2024
1 parent 4262b63 commit e67e067
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 5 deletions.
7 changes: 5 additions & 2 deletions cypress/e2e/markdown_widget_enter_spec.js
Expand Up @@ -89,7 +89,7 @@ describe('Markdown widget breaks', () => {
.enter({ shift: true })
.confirmMarkdownEditorContent(`
<p>
<br>
</p>
`);
});
Expand All @@ -98,7 +98,10 @@ describe('Markdown widget breaks', () => {
.enter({ shift: true, times: 4 })
.confirmMarkdownEditorContent(`
<p>
<br>
<br>
<br>
<br>
</p>
`);
});
Expand Down
3 changes: 1 addition & 2 deletions package.json
Expand Up @@ -15,8 +15,7 @@
"test:unit": "cross-env NODE_ENV=test jest --no-cache",
"test:e2e": "npm run build:demo && npm run test:e2e:run",
"test:e2e:ci": "npm run build:demo && npm run test:e2e:run-ci",
"test:e2e:dev": "run-p test:e2e:start test:e2e:exec-dev",
"test:e2e:start": "start-test develop 8080",
"test:e2e:dev": "start-test develop 8080 test:e2e:exec-dev",
"test:e2e:serve": "http-server -c-1 dev-test",
"test:e2e:exec": "cypress run --browser chrome --headless",
"test:e2e:exec-ci": "node cypress/run.mjs",
Expand Down
Expand Up @@ -205,7 +205,12 @@ function ThematicBreak(props) {
}

function Break(props) {
return <br {...props.attributes} />;
return (
<>
<br {...props.attributes} />
{props.children}
</>
);
}

function BulletedList(props) {
Expand Down

0 comments on commit e67e067

Please sign in to comment.