generated from eea/volto-addon-template
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #39 from eea/develop
Improve code quality
- Loading branch information
Showing
15 changed files
with
161 additions
and
66 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
import { slateBeforeEach, slateAfterEach } from '../support/e2e'; | ||
|
||
describe('Blocks Tests', () => { | ||
beforeEach(slateBeforeEach); | ||
afterEach(slateAfterEach); | ||
|
||
it('Add image cards block: Empty', () => { | ||
// Add block | ||
cy.getSlate().click(); | ||
cy.get('.ui.basic.icon.button.block-add-button').first().click(); | ||
cy.get('.blocks-chooser .title').contains('Common').click(); | ||
cy.get('.content.active.common .button.imagecards') | ||
.contains('Image Cards') | ||
.click({ force: true }); | ||
// Save | ||
cy.get('#toolbar-save').click(); | ||
cy.url().should('eq', Cypress.config().baseUrl + '/cypress/my-page'); | ||
// then the page view should contain our changes | ||
// cy.get('.block.imagecards'); | ||
}); | ||
|
||
it('Add image cards block: Round tile', () => { | ||
// Add block | ||
cy.getSlate().click(); | ||
cy.get('.ui.basic.icon.button.block-add-button').first().click(); | ||
cy.get('.blocks-chooser .title').contains('Common').click(); | ||
cy.get('.content.active.common .button.imagecards') | ||
.contains('Image Cards') | ||
.click({ force: true }); | ||
// Select round tile display | ||
cy.get('#sidebar .field-wrapper-display .react-select__control').click(); | ||
cy.get('#sidebar .field-wrapper-display .react-select__menu div') | ||
.contains('Round Tile') | ||
.click(); | ||
// Add Round Tile 1 | ||
cy.get('#sidebar .add-item-button-wrapper').click(); | ||
cy.get('.ui.accordion .active.content #field-title-0-cards-0').type( | ||
'Round Tile 1', | ||
); | ||
// Add Round Tile 2 | ||
cy.get('#sidebar .add-item-button-wrapper').click(); | ||
cy.get('.ui.accordion .active.content #field-title-0-cards-1').type( | ||
'Round Tile 2', | ||
); | ||
// Save | ||
cy.get('#toolbar-save').click(); | ||
cy.url().should('eq', Cypress.config().baseUrl + '/cypress/my-page'); | ||
// then the page view should contain our changes | ||
cy.get('.card .card-title').contains('Round Tile 1'); | ||
cy.get('.card .card-title').contains('Round Tile 2'); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.