Skip to content

Commit

Permalink
refocus confidence slider
Browse files Browse the repository at this point in the history
  • Loading branch information
kcinay055679 committed Jan 10, 2025
1 parent 99ee2f2 commit db7245c
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 7 deletions.
1 change: 1 addition & 0 deletions frontend/cypress/e2e/check-in.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ describe('okr check-in', () => {
.showAllCheckIns()
.checkOnDialog(() => cy.contains('Jaya Norris'))
.editLatestCheckIn()
.checkForDialogTextMetric()
.setCheckInConfidence(7)
.submit();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down

0 comments on commit db7245c

Please sign in to comment.