Skip to content

Commit

Permalink
Remove some unused code
Browse files Browse the repository at this point in the history
  • Loading branch information
lkleisa committed Dec 4, 2023
1 parent 8f47ada commit 6d3ba2c
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion frontend/cypress/e2e/keyresult.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ describe('OKR Overview', () => {
cy.contains('This is my new description');
});

it.only('Check validation in keyresult dialog', () => {
it('Check validation in keyresult dialog', () => {
cy.getByTestId('objective').first().getByTestId('add-keyResult').first().click();
cy.getByTestId('submit').should('be.disabled');
cy.contains('Key Result erfassen');
Expand Down
4 changes: 2 additions & 2 deletions frontend/cypress/e2e/tab.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -209,8 +209,8 @@ describe('Tab workflow tests', () => {
cy.focused().contains('Objective abschliessen');
cy.realPress('Enter');
cy.contains('Objective abschliessen');
cy.contains('Objective erfolgreich');
cy.contains('Objective nicht erfolgreich');
cy.contains('Objective erreicht');
cy.contains('Objective nicht erreicht');
cy.tabForward();
cy.tabForward();
cy.realPress('Enter');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
formControlName="changeInfo"
></textarea>
<mat-error *ngIf="hasFormFieldErrors(dialogForm, 'changeInfo')">
<span>{{ getErrorMessage("MAX_VALUE", "Kommentar / Veränderung", 4096, null) }}</span>
<span>{{ getErrorMessage("MAX_VALUE", "Kommentar / Veränderung", 4096) }}</span>
</mat-error>
</div>

Expand All @@ -55,7 +55,7 @@
formControlName="initiatives"
></textarea>
<mat-error *ngIf="hasFormFieldErrors(dialogForm, 'initiatives')">
<span>{{ getErrorMessage("MAX_VALUE", "Massnahmen", 4096, null) }}</span>
<span>{{ getErrorMessage("MAX_VALUE", "Massnahmen", 4096) }}</span>
</mat-error>
</div>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@ export class CheckInFormComponent implements OnInit {
this.dialogForm.patchValue({ actionList: this.keyResult.actionList });
}

getErrorMessage(error: string, field: string, firstNumber: number | null, secondNumber: number | null): string {
return field + this.translate.instant('DIALOG_ERRORS.' + error).format(firstNumber, secondNumber);
getErrorMessage(error: string, field: string, maxLength: number): string {
return field + this.translate.instant('DIALOG_ERRORS.' + error).format(maxLength);
}

setDefaultValues() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ export class CompleteDialogComponent {
});
}

getErrorMessage(error: string, field: string, maxLength: number | null): string {
getErrorMessage(error: string, field: string, maxLength: number): string {
return field + this.translate.instant('DIALOG_ERRORS.' + error).format(maxLength);
}
}

0 comments on commit 6d3ba2c

Please sign in to comment.