Update test

This commit is contained in:
Ramon Wenger 2021-09-02 09:55:03 +02:00
parent f84ac32aee
commit 51beefe293
2 changed files with 6 additions and 5 deletions

View File

@ -81,7 +81,7 @@ describe('Project Entry', () => {
}), }),
DeleteProjectEntry: { DeleteProjectEntry: {
deleteProjectEntry: { deleteProjectEntry: {
success: true success: true,
}, },
}, },
}; };
@ -113,7 +113,7 @@ describe('Project Entry', () => {
// cy.get('[data-cy=text-form-input]').type('Stay with Rocket\nMeet Quill'); // cy.get('[data-cy=text-form-input]').type('Stay with Rocket\nMeet Quill');
// }); // });
cy.getByDataCy('modal-title').should('contain', 'Beitrag erfassen'); cy.getByDataCy('modal-title').should('contain', 'Beitrag erfassen');
cy.getByDataCy('project-entry-input').should('exist'); cy.getByDataCy('text-form-input').should('exist');
cy.getByDataCy('use-template-button').should('exist').click(); cy.getByDataCy('use-template-button').should('exist').click();
cy.getByDataCy('upload-document-button').should('exist'); cy.getByDataCy('upload-document-button').should('exist');
cy.getByDataCy('modal-save-button').click(); cy.getByDataCy('modal-save-button').click();
@ -130,9 +130,9 @@ describe('Project Entry', () => {
cy.get('[data-cy=project-entry-more]').click(); cy.get('[data-cy=project-entry-more]').click();
cy.get('[data-cy=edit-project-entry]').click(); cy.get('[data-cy=edit-project-entry]').click();
}); });
cy.get('[data-cy=activity-input]').within(() => { cy.getByDataCy('activity-input').should('not.exist');
cy.get('[data-cy=text-form-input]').clear().type('Defeat Thanos');
}); cy.getByDataCy('text-form-input').clear().type('Defeat Thanos');
cy.get('[data-cy=modal-save-button]').click(); cy.get('[data-cy=modal-save-button]').click();
cy.get('.project-entry__paragraph:first-of-type').contains('Defeat Thanos'); cy.get('.project-entry__paragraph:first-of-type').contains('Defeat Thanos');
}); });

View File

@ -2,6 +2,7 @@
<modal :hide-header="false"> <modal :hide-header="false">
<h2 <h2
class="project-entry-modal__heading" class="project-entry-modal__heading"
data-cy="modal-title"
slot="header"> slot="header">
Beitrag erfassen Beitrag erfassen
</h2> </h2>