Skip to content

Commit

Permalink
test: update cypress test
Browse files Browse the repository at this point in the history
  • Loading branch information
kreafox committed Nov 24, 2023
1 parent 7f93774 commit f84a866
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 2 deletions.
23 changes: 22 additions & 1 deletion cypress/e2e/02-dexterity-controlpanel-layout.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,25 @@ describe('ControlPanel: Dexterity Content-Types Layout', () => {
cy.get('.content.active.common .button.group')
.contains('Section (Group)')
.click({ force: true });

cy.get('legend').contains('Section').click();
cy.get('#sidebar-settings .field-wrapper-title input').type(
'Intro section',
);
cy.get('#sidebar-settings .field-wrapper-placeholder input').type(
'Highlighted description',
);
cy.get('#sidebar-settings .field-wrapper-maxChars').type('250');
cy.get(
'#sidebar-settings .field-wrapper-allowedBlocks .react-select__value-container',
)
.click()
.type('Image{enter}');
cy.get(
'#sidebar-settings .field-wrapper-ignoreSpaces .ui.checkbox',
).click();
cy.get('.block-editor-group .blocks-form .block-editor-slate').click();

cy.get('.ui.basic.icon.button.group-block-add-button:visible').click();
cy.get('.blocks-chooser .title').contains('Media').click({ force: true });
cy.get('.content.active.media .button.image')
Expand Down Expand Up @@ -64,7 +83,9 @@ describe('ControlPanel: Dexterity Content-Types Layout', () => {
cy.getSlateTitle().type('My First Book');
cy.get('.documentFirstHeading').contains('My First Book');

cy.get('.section-block .text-slate-editor-inner').click().type('My description');
cy.get('.section-block .text-slate-editor-inner')
.click()
.type('My description');

cy.get('#toolbar-save').click();
cy.get('.documentFirstHeading').contains('My First Book');
Expand Down
2 changes: 1 addition & 1 deletion cypress/support/e2e.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ export const slateBeforeEach = (contentType = 'Document') => {
});
cy.visit('/cypress/my-page');
cy.waitForResourceToLoad('@navigation');
cy.waitForResourceToLoad('@breadcrumbs');
// cy.waitForResourceToLoad('@breadcrumbs');
cy.waitForResourceToLoad('@actions');
cy.waitForResourceToLoad('@types');
cy.waitForResourceToLoad('my-page');
Expand Down

0 comments on commit f84a866

Please sign in to comment.