-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Feature/863 Objektive Abschluss Kommentar anzeigen (#1273)
* add backend request for completed with unit tests * display the completed comment in the frontend * update import * backend formatting changes * remove 404 in the completed get request * apply backend formatter * inclued test for the completed comment * Fix naming of endpoint and the corresponding documentation and add better spacing to frontend * Rename service with typo, fix naming of e2e tests and change some logic in the frontend * Try to generalize cypress testing * Fix e2e tests by using correct state for selecting the objectives * Finish abstraction of completeDialog in e2e testing * add unit test for completed * add right role check for get of completed * fix unit test to use right state * fix completed is undefined error by not loading in always * fix takeUntilDestroy * change state enum to no longer hold svg * change backend and add tests for completed services * formatting changes and remove useless methode * change name of completed service file * move exception throwing to business service to prevent error while deleting objectives * formatt backend * update backend tests for get completed logic * formatt backend changes * remove empty test * fix logic so title of completed comment does not get shown if there is no comment written --------- Co-authored-by: Manuel <moeri@puzzle.ch>
- Loading branch information
1 parent
bcbe694
commit 784a738
Showing
26 changed files
with
286 additions
and
82 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 2 additions & 1 deletion
3
backend/src/main/java/ch/puzzle/okr/repository/CompletedRepository.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,9 @@ | ||
package ch.puzzle.okr.repository; | ||
|
||
import ch.puzzle.okr.models.Completed; | ||
import java.util.Optional; | ||
import org.springframework.data.repository.CrudRepository; | ||
|
||
public interface CompletedRepository extends CrudRepository<Completed, Long> { | ||
Completed findByObjectiveId(Long objectiveId); | ||
Optional<Completed> findByObjectiveId(Long objectiveId); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
25 changes: 25 additions & 0 deletions
25
frontend/cypress/support/helper/dom-helper/dialogs/completeDialog.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
import Dialog from './dialog'; | ||
|
||
export default class CompleteDialog extends Dialog { | ||
override submit() { | ||
cy.getByTestId('submit') | ||
.click(); | ||
} | ||
|
||
completeAs(isSuccessful: boolean) { | ||
isSuccessful ? cy.getByTestId('successful') | ||
.click() : cy.getByTestId('not-successful') | ||
.click(); | ||
return this; | ||
} | ||
|
||
writeClosingComment(comment: string) { | ||
cy.getByTestId('completeComment') | ||
.type(comment); | ||
return this; | ||
} | ||
|
||
getPage(): Cypress.Chainable { | ||
return cy.get('app-complete-dialog'); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.