Fix snapshot test

This commit is contained in:
Ramon Wenger 2022-10-26 17:05:09 +02:00
parent 3f07a91d5c
commit 3f7898c451
1 changed files with 5 additions and 5 deletions

View File

@ -236,7 +236,7 @@ describe('Snapshot', () => {
cy.getByDataCy('module-title').should('exist');
cy.getByDataCy('snapshot-header').should('not.exist');
waitNTimes(9);
waitNTimes(8);
});
it('Renames Snapshot', () => {
@ -245,11 +245,11 @@ describe('Snapshot', () => {
snapshotTitle = newTitle;
// mockUpdateSnapshot(newTitle);
cy.visit('module/miteinander-reden/snapshots');
cy.getByDataCy('snapshot-link').should('have.text', 'Old Title');
cy.getByDataCy('snapshot-link').should('contain.text', 'Old Title');
cy.getByDataCy('rename-snapshot-button').click();
cy.getByDataCy('edit-name-input').clear().type(newTitle);
cy.getByDataCy('modal-save-button').click();
cy.getByDataCy('snapshot-link').should('have.text', 'New Title');
cy.getByDataCy('snapshot-link').should('contain.text', 'New Title');
waitNTimes(5);
});
@ -271,10 +271,10 @@ describe('Snapshot', () => {
cy.getByDataCy('snapshot-entry').should('have.length', 1);
cy.getByDataCy('delete-snapshot-button').should('exist');
cy.getByDataCy('rename-snapshot-button').should('exist');
cy.getByDataCy('snapshot-link').should('have.text', 'Old Title');
cy.getByDataCy('snapshot-link').should('contain.text', 'Old Title');
cy.getByDataCy('team-snapshots-link').click();
cy.getByDataCy('snapshot-entry').should('have.length', 1);
cy.getByDataCy('snapshot-link').should('have.text', 'Shared snapshot');
cy.getByDataCy('snapshot-link').should('contain.text', 'Shared snapshot');
cy.getByDataCy('delete-snapshot-button').should('not.exist');
cy.getByDataCy('rename-snapshot-button').should('not.exist');
waitNTimes(4);