Fix snapshot test
This commit is contained in:
parent
3f07a91d5c
commit
3f7898c451
|
|
@ -236,7 +236,7 @@ describe('Snapshot', () => {
|
||||||
|
|
||||||
cy.getByDataCy('module-title').should('exist');
|
cy.getByDataCy('module-title').should('exist');
|
||||||
cy.getByDataCy('snapshot-header').should('not.exist');
|
cy.getByDataCy('snapshot-header').should('not.exist');
|
||||||
waitNTimes(9);
|
waitNTimes(8);
|
||||||
});
|
});
|
||||||
|
|
||||||
it('Renames Snapshot', () => {
|
it('Renames Snapshot', () => {
|
||||||
|
|
@ -245,11 +245,11 @@ describe('Snapshot', () => {
|
||||||
snapshotTitle = newTitle;
|
snapshotTitle = newTitle;
|
||||||
// mockUpdateSnapshot(newTitle);
|
// mockUpdateSnapshot(newTitle);
|
||||||
cy.visit('module/miteinander-reden/snapshots');
|
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('rename-snapshot-button').click();
|
||||||
cy.getByDataCy('edit-name-input').clear().type(newTitle);
|
cy.getByDataCy('edit-name-input').clear().type(newTitle);
|
||||||
cy.getByDataCy('modal-save-button').click();
|
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);
|
waitNTimes(5);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
@ -271,10 +271,10 @@ describe('Snapshot', () => {
|
||||||
cy.getByDataCy('snapshot-entry').should('have.length', 1);
|
cy.getByDataCy('snapshot-entry').should('have.length', 1);
|
||||||
cy.getByDataCy('delete-snapshot-button').should('exist');
|
cy.getByDataCy('delete-snapshot-button').should('exist');
|
||||||
cy.getByDataCy('rename-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('team-snapshots-link').click();
|
||||||
cy.getByDataCy('snapshot-entry').should('have.length', 1);
|
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('delete-snapshot-button').should('not.exist');
|
||||||
cy.getByDataCy('rename-snapshot-button').should('not.exist');
|
cy.getByDataCy('rename-snapshot-button').should('not.exist');
|
||||||
waitNTimes(4);
|
waitNTimes(4);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue