diff --git a/frontend/cypress/e2e/check-in.cy.ts b/frontend/cypress/e2e/check-in.cy.ts index 8ce9e0e561..696076bea9 100644 --- a/frontend/cypress/e2e/check-in.cy.ts +++ b/frontend/cypress/e2e/check-in.cy.ts @@ -76,6 +76,7 @@ describe('okr check-in', () => { .showAllCheckIns() .checkOnDialog(() => cy.contains('Jaya Norris')) .editLatestCheckIn() + .checkForDialogTextMetric() .setCheckInConfidence(7) .submit(); diff --git a/frontend/cypress/support/helper/dom-helper/dialogs/checkInDialog.ts b/frontend/cypress/support/helper/dom-helper/dialogs/checkInDialog.ts index 244128a0c1..35c6c115c6 100644 --- a/frontend/cypress/support/helper/dom-helper/dialogs/checkInDialog.ts +++ b/frontend/cypress/support/helper/dom-helper/dialogs/checkInDialog.ts @@ -40,22 +40,25 @@ export default class CheckInDialog extends Dialog { } setCheckInConfidence(confidence: number) { - cy.getByTestId('confidence-slider') - .as('slider'); - const input = cy.get('@slider') - .find('input'); - for (let i = 0; i < 10; i++) { - input.focus(); + this.focusConfidenceSlider(); cy.realPress('ArrowLeft'); } for (let i = 0; i < confidence; i++) { - input.focus(); + this.focusConfidenceSlider(); cy.realPress('ArrowRight'); } return this; } + private focusConfidenceSlider() { + cy.getByTestId('confidence-slider') + .as('slider'); + cy.get('@slider') + .find('input') + .focus(); + } + checkForDialogTextMetric() { cy.contains('Check-in erfassen'); cy.contains('Key Result');