-
Notifications
You must be signed in to change notification settings - Fork 21
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
TRIB-289: Refactors AttributeAPI applyPhraseToUser endpoint and all related services to use a DTO #290
TRIB-289: Refactors AttributeAPI applyPhraseToUser endpoint and all related services to use a DTO #290
Conversation
- refactors PhraseService.applyPhraseToUser to return AttributesApplyPhraseToUserDTO
- refactors with new return type of AttributesApplyPhraseToUserDTO - note: fixes logic error for testApplyPhraseToUserWhenPhraseDoesNotExistInToBeReviewed which was incorrectly finding a phrase in toBeReviewed repository
- removes context="test" from changelog-202309050841.xml - reasoning: these are notification constants
- adds type for in review
This reverts commit 1a5b26c.
- adds constructAttributesApplyPhraseToUserDTO to PhraseService interface to be used by AttributesAPIController
- refactors AttributesAPIController applyPhraseToUser with AttributesApplyPhraseToUserDTO - refactors sendNotification with in review notification and AttributesApplyPhraseToUserDTO
- refactors applyPhraseToUser tests with AttributeApplyPhraseToUserDTO
- refactors AttributeApplyPhraseToUserDTO isSuccess field to be true when phrase added to toBeReviewed - fixes tests to reflect this change
- adds testConstructPhraseDTPFromPhraseInformationWhenPhraseHasAllFourWords and testConstructPhraseDTPFromPhraseInformationWhenPhraseOnlyHasVerbAndNoun
- adds testConstructAttributesApplyPhraseToUserDTO
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## feature/review-attributes-page #290 +/- ##
====================================================================
- Coverage 82.55% 82.54% -0.01%
- Complexity 556 559 +3
====================================================================
Files 79 80 +1
Lines 1685 1690 +5
Branches 275 276 +1
====================================================================
+ Hits 1391 1395 +4
Misses 254 254
- Partials 40 41 +1 ☔ View full report in Codecov by Sentry. |
@@ -7,6 +7,7 @@ | |||
public class NotificationType { | |||
|
|||
public static final NotificationType ATTRIBUTE_REQUEST_APPROVED = new NotificationType(1L, "Attribute request approved", null); | |||
public static final NotificationType ATTRIBUTE_REQUEST_IN_REVIEW = new NotificationType(1L, "Attribute request in review", null); |
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.
There was a bug in the previous version.. This ID should be unique, instead of 1L
- refactors PhraseService.applyPhraseToUser to return AttributesApplyPhraseToUserDTO
- refactors with new return type of AttributesApplyPhraseToUserDTO - note: fixes logic error for testApplyPhraseToUserWhenPhraseDoesNotExistInToBeReviewed which was incorrectly finding a phrase in toBeReviewed repository
- removes context="test" from changelog-202309050841.xml - reasoning: these are notification constants
- adds type for in review
This reverts commit 1a5b26c.
- adds constructAttributesApplyPhraseToUserDTO to PhraseService interface to be used by AttributesAPIController
- refactors AttributesAPIController applyPhraseToUser with AttributesApplyPhraseToUserDTO - refactors sendNotification with in review notification and AttributesApplyPhraseToUserDTO
- refactors applyPhraseToUser tests with AttributeApplyPhraseToUserDTO
- refactors AttributeApplyPhraseToUserDTO isSuccess field to be true when phrase added to toBeReviewed - fixes tests to reflect this change
- adds testConstructPhraseDTPFromPhraseInformationWhenPhraseHasAllFourWords and testConstructPhraseDTPFromPhraseInformationWhenPhraseOnlyHasVerbAndNoun
- adds testConstructAttributesApplyPhraseToUserDTO
closing due to errors on local. |
Testing: