diff --git a/frontend/cypress/e2e/objective.cy.ts b/frontend/cypress/e2e/objective.cy.ts index 56f15f8748..34913bc746 100644 --- a/frontend/cypress/e2e/objective.cy.ts +++ b/frontend/cypress/e2e/objective.cy.ts @@ -96,7 +96,35 @@ describe('OKR Objective e2e tests', () => { op.getObjectiveByNameAndState('This objective will be reopened after', 'ongoing').should('exist'); }); - it('Ongoing objective back to draft state', () => { + it(`Cancel Reopen Successful Objective`, () => { + op.addObjective().fillObjectiveTitle('The reopening of this objective will be canceled').submit(); + + op.getObjectiveByNameAndState('The reopening of this objective will be canceled', 'ongoing') + .findByTestId('three-dot-menu') + .click(); + + op.selectFromThreeDotMenu('Objective abschliessen'); + + cy.getByTestId('successful').click(); + cy.getByTestId('submit').click(); + + cy.wait(500); + + op.getObjectiveByNameAndState('he reopening of this objective will be canceled', 'successful') + .findByTestId('three-dot-menu') + .click(); + + op.selectFromThreeDotMenu('Objective wiedereröffnen'); + + ConfirmDialog.do() + .checkTitle('Objective wiedereröffnen') + .checkDescription('Soll dieses Objective wiedereröffnet werden?') + .cancel(); + + op.getObjectiveByNameAndState('The reopening of this objective will be canceled', 'successful').should('exist'); + }); + + it('Cancel Ongoing objective back to draft state', () => { onlyOn('chrome'); op.addObjective().fillObjectiveTitle('This objective will be returned to draft state').submit(); @@ -113,6 +141,25 @@ describe('OKR Objective e2e tests', () => { op.getObjectiveByNameAndState('This objective will be returned to draft state', 'draft').should('exist'); }); + it.only('Ongoing objective back to draft state', () => { + onlyOn('chrome'); + op.addObjective().fillObjectiveTitle('Putting this objective back to draft state will be canceled').submit(); + + op.getObjectiveByNameAndState('Putting this objective back to draft state will be canceled', 'ongoing') + .findByTestId('three-dot-menu') + .click(); + op.selectFromThreeDotMenu('Objective als Draft speichern'); + + ConfirmDialog.do() + .checkTitle('Objective als Draft speichern') + .checkDescription('Soll dieses Objective als Draft gespeichert werden?') + .cancel(); + + op.getObjectiveByNameAndState('Putting this objective back to draft state will be canceled', 'ongoing').should( + 'exist', + ); + }); + it(`Search for Objective`, () => { op.addObjective().fillObjectiveTitle('Search after this objective').submit();