Skip to content

Commit

Permalink
Add E2E test to check if keyResultType can not be changed after a che…
Browse files Browse the repository at this point in the history
…ckin
  • Loading branch information
MasterEvarior committed Nov 28, 2024
1 parent 33a0445 commit 34bbbcd
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions frontend/cypress/e2e/key-result.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,8 @@ describe('OKR Overview', () => {
.withOrdinalValues('My commit zone', 'My target zone', 'My stretch goal')
.checkForDialogTextOrdinal()
.fillKeyResultDescription('This is my description')
.addActionPlanElement('Action 1')
.addActionPlanElement('Action 2')
.submit();
keyResultDetailPage.visit('Here we want to change keyresult title').editKeyResult();

Expand All @@ -170,6 +172,33 @@ describe('OKR Overview', () => {
cy.contains('Metrisch');
cy.contains('Jaya Norris');
cy.contains('This is my new description');
cy.contains('Action 1');
cy.contains('Action 2');
});

it('A KeyResult should not be able to change type after a checkin', () => {
overviewPage
.addKeyResult()
.fillKeyResultTitle('Here we want to create a checkin')
.withOrdinalValues('My commit zone', 'My target zone', 'My stretch goal')
.checkForDialogTextOrdinal()
.fillKeyResultDescription('This is my description')
.addActionPlanElement('Action 1')
.addActionPlanElement('Action 2')
.submit();

keyResultDetailPage
.visit('Here we want to create a checkin')
.createCheckIn()
.selectOrdinalCheckInZone('commit')
.setCheckInConfidence(6)
.submit();

keyResultDetailPage.close();

keyResultDetailPage.visit('Here we want to create a checkin').editKeyResult();

cy.getByTestId('metricTab').should('have.class', 'non-active');
});

it('Check validation in keyresult dialog', () => {
Expand Down

0 comments on commit 34bbbcd

Please sign in to comment.