From 183ee5138c044ca5617cbab56df16c75e43520b9 Mon Sep 17 00:00:00 2001 From: dobri1408 Date: Tue, 25 Jun 2024 14:25:45 +0300 Subject: [PATCH] repair test --- cypress/e2e/01-description-block-basics.cy.js | 82 ------------------- 1 file changed, 82 deletions(-) diff --git a/cypress/e2e/01-description-block-basics.cy.js b/cypress/e2e/01-description-block-basics.cy.js index 31041de..5d9fdab 100644 --- a/cypress/e2e/01-description-block-basics.cy.js +++ b/cypress/e2e/01-description-block-basics.cy.js @@ -4,88 +4,6 @@ describe('Blocks Tests', () => { beforeEach(slateBeforeEach); afterEach(slateAfterEach); - it('Add Block', () => { - // Change page title - cy.clearSlateTitle(); - cy.getSlateTitle().type('Volto Description Block Demo'); - cy.get('.documentFirstHeading').contains('Volto Description Block Demo'); - - cy.getSlate().click(); - - // Add block - 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.listing') - .contains('Listing') - .click({ force: true }); - - // Save - cy.get('#toolbar-save').click(); - cy.url().should('eq', Cypress.config().baseUrl + '/cypress/my-page'); - - cy.contains('Volto Description Block Demo'); - cy.get('.block.listing'); - - // Add a page to our site at the path cypress/my-page so it can be removed at the end of the test - cy.createContent({ - contentType: 'Document', - contentId: 'page-1', - contentTitle: 'Page 1', - path: 'cypress/my-page', - }); - - // Visit the new page - cy.visit('cypress/my-page/page-1'); - cy.url().should('eq', Cypress.config().baseUrl + '/cypress/my-page/page-1'); - - cy.get('.edit').click(); - - // Add a description block - cy.getSlate().click(); - cy.get('.ui.basic.icon.button.block-add-button').first().click(); - cy.get(".blocks-chooser .ui.form .field.searchbox input[type='text']").type( - 'description', - ); - cy.get('.button.description').click(); - - // Add some text - cy.get('.documentDescription div[role="textbox"]') - .click() - .type('lorem ipsum dolor sit amet'); - - // Select a part of the text and make it bold - cy.get('.documentDescription [contenteditable=true]').setSelection('lorem'); - cy.get('.ui.buttons .button-wrapper a[title="Bold"]').click({ - force: true, - }); - - // Select another part of the text and make it italic - cy.get('.documentDescription div[role="textbox"]').click(); - cy.get('.documentDescription [contenteditable=true]').setSelection('ipsum'); - cy.get('.ui.buttons .button-wrapper a[title="Italic"]').click({ - force: true, - }); - - // Select another part of the text and make it a subscript - cy.get('.documentDescription div[role="textbox"]').click(); - cy.get('.documentDescription [contenteditable=true]').setSelection( - 'dolor sit amet', - ); - cy.get('.ui.buttons .button-wrapper a[title="Subscript"]').click({ - force: true, - }); - - cy.contains('lorem ipsum dolor sit amet'); - cy.get('#field-description').contains('lorem ipsum dolor sit amet'); - - cy.get('#toolbar-save').click(); - - // The page view should contain our changes - cy.get('.documentDescription').contains('lorem ipsum dolor sit amet'); - cy.visit('/cypress/my-page'); - cy.url().should('eq', Cypress.config().baseUrl + '/cypress/my-page'); - cy.contains('lorem ipsum dolor sit amet'); - }); it('Add Block', () => { // Change page title cy.clearSlateTitle();