Skip to content

Commit

Permalink
remove slate dependency, add conditional
Browse files Browse the repository at this point in the history
  • Loading branch information
nileshgulia1 committed Dec 22, 2020
1 parent 0027e44 commit 3d72f97
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 11 deletions.
2 changes: 1 addition & 1 deletion Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ pipeline {
GIT_NAME = "volto-accordion-block"
NAMESPACE = "@eeacms"
SONARQUBE_TAGS = "volto.eea.europa.eu"
DEPENDENCIES = "@eeacms/volto-blocks-form volto-slate:asDefault"
DEPENDENCIES = "@eeacms/volto-blocks-form"
}

stages {
Expand Down
27 changes: 19 additions & 8 deletions cypress/integration/blocks-accordion.js
Original file line number Diff line number Diff line change
Expand Up @@ -109,14 +109,25 @@ describe('Block Tests', () => {
.type('panel 1')
.should('have.value', 'panel 1');
cy.wait(1000);
cy.get('div.slate-editor')
.first()
.within(() => {
cy.get('p[data-slate-node="element"]')
.should('have.value', '')
.invoke('attr', 'tabindex', 1)
.type('children', { delay: 50 });
});
if (cy.find('div.slate-editor').length) {
cy.get('div.slate-editor')
.first()
.within(() => {
cy.get('p[data-slate-node="element"]')
.should('have.value', '')
.invoke('attr', 'tabindex', 1)
.type('children', { delay: 50 });
});
} else {
cy.get('div.DraftEditor-editorContainer')
.first()
.within(() => {
cy.get('span[data-text=true]')
.should('have.value', '')
.invoke('attr', 'tabindex', 1)
.type('children', { delay: 50 });
});
}
cy.get('.accordion:nth-child(2) > .title input').click();
cy.get('.accordion:nth-child(2) > .title input').type('panel 2');
cy.get('.accordion:nth-child(2) > .title > .icon').click();
Expand Down
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,7 @@
"release-it": "*"
},
"dependencies": {
"@eeacms/volto-blocks-form": "^1.0.0",
"volto-slate": "^1.0.0"
"@eeacms/volto-blocks-form": "^1.0.0"
},
"scripts": {
"release": "release-it",
Expand Down

0 comments on commit 3d72f97

Please sign in to comment.