fix(widget-markdown): properly check for selection when inserting links (#4075)
This commit is contained in:
@ -268,6 +268,7 @@ Cypress.Commands.add('insertEditorComponent', title => {
|
||||
['clickCodeButton', 'Code'],
|
||||
['clickItalicButton', 'Italic'],
|
||||
['clickQuoteButton', 'Quote'],
|
||||
['clickLinkButton', 'Link'],
|
||||
].forEach(([commandName, toolbarButtonName]) => {
|
||||
Cypress.Commands.add(commandName, opts => {
|
||||
return cy.clickToolbarButton(toolbarButtonName, opts);
|
||||
@ -316,6 +317,12 @@ Cypress.Commands.add('clearMarkdownEditorContent', () => {
|
||||
.backspace({ times: 2 });
|
||||
});
|
||||
|
||||
Cypress.Commands.add('confirmRawEditorContent', expectedDomString => {
|
||||
cy.get('.cms-editor-raw').within(() => {
|
||||
cy.contains('span', expectedDomString);
|
||||
});
|
||||
});
|
||||
|
||||
function toPlainTree(domString) {
|
||||
return rehype()
|
||||
.use(removeSlateArtifacts)
|
||||
|
Reference in New Issue
Block a user