From cb84a1576c6ad6eca106d57124d0934e73371e85 Mon Sep 17 00:00:00 2001 From: Ramon Wenger Date: Thu, 23 Jun 2022 16:07:55 +0200 Subject: [PATCH] Update cypress test --- .../integration/frontend/rooms/room-page.spec.js | 15 ++++++++------- .../content-block-form/ContentBlockForm.vue | 5 ++++- .../content-block-form/ContentFormSection.vue | 5 ++++- 3 files changed, 16 insertions(+), 9 deletions(-) diff --git a/client/cypress/integration/frontend/rooms/room-page.spec.js b/client/cypress/integration/frontend/rooms/room-page.spec.js index 89395c0c..e98dd005 100644 --- a/client/cypress/integration/frontend/rooms/room-page.spec.js +++ b/client/cypress/integration/frontend/rooms/room-page.spec.js @@ -61,13 +61,13 @@ describe('The Room Page', () => { }); cy.visit(`/room/${slug}`); - cy.get('[data-cy=add-room-entry-button]').click(); - cy.get('.add-content-element:first-of-type').click(); - cy.get('[data-cy=choose-text-widget]').click(); - cy.get('[data-cy=modal-title-input] > .modal-input__inputfield').type(entryTitle); + cy.getByDataCy('add-room-entry-button').click(); + cy.getByDataCy('add-content-link').first().click(); + cy.getByDataCy('choose-text-widget').click(); + cy.getByDataCy('input-with-label-input').type(entryTitle); - cy.get('[data-cy=text-form-input]').type(entryText); - cy.get('[data-cy=modal-save-button]').click(); + cy.get('.tip-tap__editor').type(entryText); + cy.getByDataCy('save-button').click(); cy.get('.room-entry__content:first').should('contain', entryText).should('contain', 'Rachel Green'); }); @@ -240,7 +240,8 @@ describe('The Room Page', () => { cy.visit(`/room/${slug}`); cy.getByDataCy('add-room-entry-button').click(); - cy.getByDataCy('add-room-entry-modal').should('exist'); + + cy.getByDataCy('content-form-section-title').should('have.text', 'Titel (Pflichtfeld)'); }); it('changes class while on room page', () => { diff --git a/client/src/components/content-block-form/ContentBlockForm.vue b/client/src/components/content-block-form/ContentBlockForm.vue index 6450cd3c..dd933f50 100644 --- a/client/src/components/content-block-form/ContentBlockForm.vue +++ b/client/src/components/content-block-form/ContentBlockForm.vue @@ -19,7 +19,10 @@ /> - + {{ title }} + /> {{ title }}