generated from eea/volto-addon-template
-
Notifications
You must be signed in to change notification settings - Fork 6
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 #80 from eea/develop
Release
- Loading branch information
Showing
10 changed files
with
287 additions
and
35 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 was deleted.
Oops, something went wrong.
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,45 @@ | ||
import { slateBeforeEach, slateAfterEach } from '../support/e2e'; | ||
|
||
describe('Blocks Tests', () => { | ||
beforeEach(slateBeforeEach); | ||
afterEach(slateAfterEach); | ||
|
||
it('Style Block', () => { | ||
// Change page title | ||
cy.get('[contenteditable=true]').first().click(); | ||
|
||
cy.get('[contenteditable=true]').first().clear(); | ||
|
||
cy.get('[contenteditable=true]').first().type('Volto Style Block Demo'); | ||
|
||
cy.get('.documentFirstHeading').contains('Volto Style Block Demo'); | ||
|
||
// Align the block | ||
cy.get('.open-styles-button button').click(); | ||
cy.contains('Standard').click(); | ||
cy.get( | ||
'.inline.field.align-widget.field-wrapper-textAlign .align-buttons .ui.buttons', | ||
) | ||
.eq(2) | ||
.click(); | ||
|
||
// Change the background color of the block | ||
cy.contains('Decorations').click(); | ||
cy.get( | ||
'.inline.field.simple-color-picker-widget.field-wrapper-backgroundColor .ui.huge.button', | ||
).click(); | ||
cy.get('.github-picker.color-picker div[title="#9dc6d4"]').click(); | ||
|
||
cy.get('[contenteditable=true]').first().type('{enter}'); | ||
|
||
// Save page | ||
cy.get('#toolbar-save').click(); | ||
cy.url().should('eq', Cypress.config().baseUrl + '/cypress/my-page'); | ||
|
||
// The page view should contain our changes | ||
cy.contains('Volto Style Block Demo'); | ||
cy.get('.has--backgroundColor--9dc6d4.has--textAlign--center').should( | ||
'exist', | ||
); | ||
}); | ||
}); |
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.