-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
2,056 additions
and
2,610 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1 @@ | ||
import '@plone/volto/cypress/add-commands'; | ||
|
||
// Set PLONE_SITE_ID and PLONE_API_URL as cypress environment variables | ||
// if testing without using localhost or a site id of `plone`. | ||
|
||
// --- CUSTOM COMMANDS ------------------------------------------------------------- | ||
Cypress.Commands.add('custom_command', () => { | ||
// Custom code here... | ||
}); | ||
import '@plone/volto-testing/cypress/support/commands'; |
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,34 @@ | ||
context('Blocks Acceptance Tests', () => { | ||
describe('Text Block Tests', () => { | ||
beforeEach(() => { | ||
// given a logged in editor and a page in edit mode | ||
cy.visit('/'); | ||
cy.autologin(); | ||
cy.createContent({ | ||
contentType: 'Document', | ||
contentId: 'document', | ||
contentTitle: 'Test document', | ||
}); | ||
cy.visit('/document'); | ||
cy.waitForResourceToLoad('document'); | ||
cy.navigate('/document/edit'); | ||
}); | ||
|
||
it('As editor I can add a Follow Us block', function () { | ||
cy.intercept('PATCH', '/**/document').as('edit'); | ||
cy.intercept('GET', '/**/document').as('content'); | ||
cy.intercept('GET', '/**/Document').as('schema'); | ||
|
||
cy.getSlate().click(); | ||
cy.get('.button .block-add-button').click({ force: true }); | ||
cy.get('.blocks-chooser .common .button.follow_us').click({ | ||
force: true, | ||
}); | ||
cy.get('#blockform-fieldset-default .ui.input #field-title') | ||
.click() | ||
.type('Redes sociais'); | ||
cy.get('.inline.field.field-wrapper-animate .ui.checkbox').click(); | ||
cy.get('#toolbar-save').click(); | ||
}); | ||
}); | ||
}); |
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.