Fix cypress tests
This commit is contained in:
parent
a17db3f289
commit
442a50e29d
|
|
@ -155,14 +155,17 @@ describe('Project Page', () => {
|
|||
cy.mockGraphqlOps({
|
||||
operations: getOperationsForSharing,
|
||||
});
|
||||
|
||||
cy.visit('/portfolio/groot');
|
||||
const unsharedText = 'Mit Lehrperson teilen';
|
||||
const sharedText = 'Nicht mehr teilen';
|
||||
|
||||
cy.visit('/portfolio/groot');
|
||||
cy.getByDataCy('project-title').contains('Groot'); // sanity check, make sure the page is fully loaded
|
||||
cy.getByDataCy('project-share-link').should('contain', unsharedText);
|
||||
cy.getByDataCy('project-share-link').click();
|
||||
cy.getByDataCy('project-title').contains('Groot'); // sanity check, make sure the page is fully loaded
|
||||
cy.getByDataCy('project-share-link').should('contain', sharedText);
|
||||
cy.getByDataCy('project-share-link').click();
|
||||
cy.getByDataCy('project-title').contains('Groot'); // sanity check, make sure the page is fully loaded
|
||||
cy.getByDataCy('project-share-link').should('contain', unsharedText);
|
||||
});
|
||||
|
||||
|
|
@ -203,6 +206,7 @@ describe('Project Page', () => {
|
|||
cy.getByDataCy('use-template-button').should('exist').click();
|
||||
cy.getByDataCy('upload-document-button').should('exist');
|
||||
cy.getByDataCy('modal-save-button').click();
|
||||
cy.get('.modal').should('not.exist'); // make sure the modal is closed
|
||||
|
||||
cy.get('.project-entry:last-of-type').within(() => {
|
||||
cy.get('.project-entry__paragraph:first-of-type').contains('Schwierigkeiten');
|
||||
|
|
|
|||
Loading…
Reference in New Issue