-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature/863 Objektive Abschluss Kommentar anzeigen #1273
base: main
Are you sure you want to change the base?
Conversation
a57376a
to
bfb9128
Compare
backend/src/main/java/ch/puzzle/okr/service/authorization/CompletedAuthorizationService.java
Outdated
Show resolved
Hide resolved
…tter spacing to frontend
…ic in the frontend
694ef76
to
c259a49
Compare
@DisplayName("get() should throw exception when Completed with id cant be found") | ||
@Test | ||
void getShouldThrowExceptionWhenCompletedWithIdCantBeFound() throws Exception { | ||
doThrow(new ResponseStatusException(HttpStatus.NOT_FOUND, "Completed not found")) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You are throwing an exception using mockito and then you just verify that this exception is thrown.
But this behavior doesnt occur while testing locally, you are just getting an 401 or a 500.
Try to just return null or smth like that from the persistenceservice and let your code handle it by itself
@@ -48,6 +54,15 @@ export class ObjectiveDetailComponent implements OnInit { | |||
.subscribe((objective) => this.objective$.next(objective)); | |||
} | |||
|
|||
loadComponent(id: number): void { | |||
this.completedService | |||
.getCompleted(id) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't load the completed all the time.
You get an error if the objective isnt completet
id: 6, | ||
version: 1, | ||
title: 'titleWriteableFalse', | ||
description: 'descriptionWriteableFalse', | ||
teamId: 2, | ||
quarterId: 2, | ||
quarterLabel: 'GJ 22/23-Q2', | ||
state: State.NOTSUCCESSFUL, | ||
state: 'NOTSUCCESSFUL', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why?
isWriteable: true | ||
}; | ||
|
||
export const objectiveWriteableFalse: Objective = { | ||
export const objectiveWriteableFalse: any = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is bad
No description provided.