diff --git a/cypress/support/slate.js b/cypress/support/slate.js new file mode 100644 index 0000000..d910f6c --- /dev/null +++ b/cypress/support/slate.js @@ -0,0 +1,25 @@ +export const createSlateBlock = () => { + cy.get('.ui.basic.icon.button.block-add-button').first().click(); + cy.get('.blocks-chooser .title').contains('Text').click(); + cy.get('.ui.basic.icon.button.slate').contains('Text').click(); + return getSelectedSlateEditor(); +}; + +export const getSelectedSlateEditor = () => { + return cy.get('.slate-editor.selected [contenteditable=true]').click(); +}; + +export const getSlateEditorAndType = (selector, type) => { + return cy + .wait(1000) + .get(selector) + .focus() + .click() + .wait(2000) + .type(type) + .wait(1000); +}; + +export const getSlateEditorAndClear = (selector) => { + return cy.get(selector).focus().click().wait(1000).clear(); +}; diff --git a/cypress/tests/introduction.cy.js b/cypress/tests/introduction.cy.js index 387b2c9..0acf016 100644 --- a/cypress/tests/introduction.cy.js +++ b/cypress/tests/introduction.cy.js @@ -8,6 +8,7 @@ context('Introduction Acceptance Tests', () => { contentType: 'Document', contentId: 'document', contentTitle: 'Document', + path: '/', }); cy.autologin(); }); diff --git a/packages/volto-introduction-block/CHANGELOG.md b/packages/volto-introduction-block/CHANGELOG.md index 6f10a8a..6b455c2 100644 --- a/packages/volto-introduction-block/CHANGELOG.md +++ b/packages/volto-introduction-block/CHANGELOG.md @@ -26,14 +26,3 @@ - Disable the heading and blockquote buttons in the Slate editor toolbar for the introduction block. @danlavrz [#1](https://github.com/kitconcept/volto-introduction-block/pull/1) - Add new tests model based in docker @sneridagh [#2](https://github.com/kitconcept/volto-introduction-block/pull/2) - - -## 1.1.0 (unreleased) - -### Breaking - -### Feature - -### Bugfix - -### Internal