parent
f80c07da27
commit
06c7e251ce
@ -25,6 +25,17 @@ describe('Markdown widget', () => {
|
|||||||
<p></p>
|
<p></p>
|
||||||
`);
|
`);
|
||||||
});
|
});
|
||||||
|
it('moves to previous block when no character left to delete', () => {
|
||||||
|
cy.focused()
|
||||||
|
.type('foo')
|
||||||
|
.enter()
|
||||||
|
.clickHeadingOneButton()
|
||||||
|
.type('a')
|
||||||
|
.backspace({times: 2})
|
||||||
|
.confirmMarkdownEditorContent(`
|
||||||
|
<p>foo</p>
|
||||||
|
`);
|
||||||
|
});
|
||||||
it('does nothing at start of first block in document when non-empty and non-default', () => {
|
it('does nothing at start of first block in document when non-empty and non-default', () => {
|
||||||
cy.focused()
|
cy.focused()
|
||||||
.clickHeadingOneButton()
|
.clickHeadingOneButton()
|
||||||
|
@ -15,7 +15,7 @@ function CloseBlock({ defaultType }) {
|
|||||||
return next();
|
return next();
|
||||||
}
|
}
|
||||||
if (startBlock.type !== defaultType) {
|
if (startBlock.type !== defaultType) {
|
||||||
return editor.setBlocks(defaultType);
|
editor.setBlocks(defaultType);
|
||||||
}
|
}
|
||||||
return next();
|
return next();
|
||||||
},
|
},
|
||||||
|
Loading…
x
Reference in New Issue
Block a user