Skip to content
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

Draft
wants to merge 15 commits into
base: main
Choose a base branch
from

Conversation

Miguel7373
Copy link
Collaborator

No description provided.

@Miguel7373 Miguel7373 force-pushed the feature/863-show-objective-completed-comment branch from a57376a to bfb9128 Compare January 7, 2025 10:05
@Miguel7373 Miguel7373 linked an issue Jan 7, 2025 that may be closed by this pull request
4 tasks
@Miguel7373 Miguel7373 force-pushed the feature/863-show-objective-completed-comment branch from 694ef76 to c259a49 Compare January 9, 2025 12:52
@kcinay055679
Copy link
Collaborator

  • Whenever an ongoing Objective is clicked, spring throws an error complaing that completed is null. Why is completed even queried for an ongoing objective?

  • If you access an objective you just completed as successful (and only then) angular throws errors:
    image

@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"))
Copy link
Collaborator

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

frontend/cypress/e2e/objective.cy.ts Show resolved Hide resolved
@@ -48,6 +54,15 @@ export class ObjectiveDetailComponent implements OnInit {
.subscribe((objective) => this.objective$.next(objective));
}

loadComponent(id: number): void {
this.completedService
.getCompleted(id)
Copy link
Collaborator

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',
Copy link
Collaborator

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 = {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is bad

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Objektive Abschluss Kommentar anzeigen
4 participants