Skip to content

Commit

Permalink
Merge pull request #1096 from eclipse-tractusx/feature/962-notificati…
Browse files Browse the repository at this point in the history
…on-model-update

feature(chore):962 fixed notifications / cucumber tests
  • Loading branch information
ds-mwesener authored Jun 24, 2024
2 parents a02f407 + b2690d9 commit 568805e
Show file tree
Hide file tree
Showing 15 changed files with 215 additions and 193 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ _**For better traceability add the corresponding GitHub issue number in each cha
- #965 Implement proxy functionality of the IRS policy store
- #962 Changed notification model to new one in frontend/backend
- #962 Removed initial notification message for notification flow
- #962 Adapt cucumber test to include the mandatory attributes for creating a quality notification
- #753 Refactored message history in notification detail view
- XXX updated local deployment documentation

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,22 @@ skinparam linetype ortho
title: Notification Domain

class Notification {
bpn : BPN;
id: Long,
title : String;
type: NotificationType;
notificationId : NotificationId;
notificationStatus : NotificationStatus;
description: String;
createdAt: Instant;
notificationSide: NotificationSide;
status : NotificationStatus;
createdBy: String;
createdByName: String;
createdDate: Instant;
updatedDate: Instant;
assetIds: ArrayList<String>();
closeReason: String;
acceptReason: String;
declineReason: String;
messages: List<NotificationMessage>;
channel: NotificationSide;
sentTo: String;
sentToName: String;
severity: NotificationSeverity;
targetDate: Instant;
messages: List<NotificationMessage>
description: String;
}

enum NotificationType{
Expand All @@ -39,18 +42,16 @@ bpn: String;
}
class NotificationMessage {
id: String
createdBy: String
createdByName: String
sentBy: String
sentByName: String
sendTo: String
sendToName: String
contractAgreementId: String
notificationReferenceId: String
targetDate: Instant
severity: NotificationSeverity;
edcNotificationId: String;
created: LocalDateTime;
updated: LocalDateTime;
messageDate: Instant;
messageId: String;
message: String;
status: NotificationStatus;
errorMessage: String;
}
Expand Down
32 changes: 18 additions & 14 deletions docs/src/uml-diagrams/arc42/cross-cutting/erm-trace-x.puml
Original file line number Diff line number Diff line change
Expand Up @@ -74,38 +74,42 @@ ENTITY public.notification {
+ id : int8 GENERATED
title : varchar(255)
type : varchar(50)
bpn : varchar(255)
close_reason : varchar(1000)
created : timestamp
description : varchar(1000)
status : varchar(50)
side : varchar(50)
accept_reason : varchar(1000)
decline_reason : varchar(1000)
updated : timestamp
error_message : varchar(255)
description : varchar(1000)
createdBy: varchar
createdByName: varchar
createdDate: timestamp
updatedDate : timestamp
assetIds: varchar
channel: boolean
sendTo: varchar
sentToName: varchar
severity: int4
targetDate: instant
messages: notification_message
}


ENTITY public.notification_message {
+ id : varchar(255)
sentBy: varchar
sentByName: varchar

contract_agreement_id : varchar(255)

edc_url : varchar(255)
notification_reference_id : varchar(255)
send_to : varchar(255)
created_by : varchar(255)
notification_id : bigint,
target_date : timestamp
severity : varchar(255)
created_by_name : varchar(255)
send_to_name : varchar(255)
edc_notification_id : varchar(255)
status : varchar(255)
created : timestamp
updated : timestamp
message_date: instant
error_message : varchar
message: varchar
message_id : varchar(255)
is_initial : boolean
}


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ public static Notification toDomain(NotificationEntity notificationEntity) {
.targetDate(convertInstantToString(notificationEntity.getTargetDate()))
.severity(NotificationSeverity.fromString(notificationEntity.getSeverity() != null ? notificationEntity.getSeverity().getRealName() : null))
.notifications(messages)
.initialReceiverBpns(List.of())
.initialReceiverBpns(List.of(initialReceiverBpn))
.build();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,14 +68,14 @@ Feature: 👍[BE][TABLE_FEATURE] Implementation of Sorting in table views
#Check if *owner filter* in *assets* is working correctly including:
#* filter without owner specification returns assets of all owner
#* filter for owner specification only return desired assets
@TRACEFOSS-1221 @TRACEFOSS-3373 @TRACEFOSS-3128 @TRACEFOSS-2910 @TRACEFOSS-2715 @TRACEFOSS-1101 @INTEGRATION_TEST
@TRACEFOSS-1221 @TRACEFOSS-3373 @TRACEFOSS-3128 @TRACEFOSS-2910 @TRACEFOSS-2715 @TRACEFOSS-1101 @INTEGRATION_TEST
Scenario Outline: [BE] Check correct filtering of owner in assets
When I am logged into TRACE_X_A application
And I request assets with <owner-filter>
Then I check, if only assets with <owner-filter> are responded

Examples:
Examples:
| owner-filter |
| "SUPPLIER" |
| "CUSTOMER" |
| "OWN" |
| "OWN" |
Original file line number Diff line number Diff line change
Expand Up @@ -33,37 +33,37 @@ Feature: ⭐[BE] User select severity for Quality Investigation
# * Add new secrets to the code
#
@TRACEFOSS-1220 @TRACEFOSS-3373 @TRACEFOSS-3128 @TRACEFOSS-2910 @TEST-1217 @TRACEFOSS-2715 @TEST-904 @TRACEFOSS-1920 @TRACEFOSS-1673 @TRACEFOSS-1101 @TRACEFOSS-1139 @TRACEFOSS-1138 @INTEGRATION_TEST @[QualityInvestigation]
Scenario Outline: [BE] Check correct processing of severity in quality investigation
@TRACEFOSS-1220 @TRACEFOSS-3373 @TRACEFOSS-3128 @TRACEFOSS-2910 @TEST-1217 @TRACEFOSS-2715 @TEST-904 @TRACEFOSS-1920 @TRACEFOSS-1673 @TRACEFOSS-1101 @TRACEFOSS-1139 @TRACEFOSS-1138 @INTEGRATION_TEST @[QualityInvestigation]
Scenario Outline: [BE] Check correct processing of severity in quality investigation
When I am logged into TRACE_X_A application
When I use assets with ids 'urn:uuid:7eeeac86-7b69-444d-81e6-655d0f1513bd'
And I create quality notification
And I create quality notification
| "severity" | <severity> |
| "description" | "Testing severity TRACEFOSS-1220" |
| "type" | "INVESTIGATION" |
Then I check, if quality notification has proper values
| "type" | "INVESTIGATION" |
Then I check, if quality notification has proper values
| "severity" | <severity> |
| "description" | "Testing severity TRACEFOSS-1220" |
| "status" | "CREATED" |
When I approve quality notification
Then I check, if quality notification has proper values
When I approve quality notification
Then I check, if quality notification has proper values
| "status" | "SENT" |
When I am logged into TRACE_X_B application
Then I check, if quality notification has been received
Then I check, if quality notification has proper values
Then I check, if quality notification has been received
Then I check, if quality notification has proper values
| "severity" | <severity> |
| "description" | "Testing severity TRACEFOSS-1220" |
| "status" | "RECEIVED" |
When I acknowledge quality notification
Then I check, if quality notification has proper values
When I acknowledge quality notification
Then I check, if quality notification has proper values
| "status" | "ACKNOWLEDGED" |
When I am logged into TRACE_X_A application
Then I check, if quality notification has proper values
Then I check, if quality notification has proper values
| "status" | "ACKNOWLEDGED" |

Examples:
Examples:
|severity|
|"MINOR"|
|"MAJOR"|
|"CRITICAL"|
|"LIFE-THREATENING"|
|"LIFE-THREATENING"|
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
@TRACEFOSS-1393
Feature: ⭐ [BE][QUALITY_ALERTS] Create (POST) quality alerts (Rest API)
#h2. User Story
#h2. User Story
#
#*As a* user
#*I want to* be able to see all quality alerts / notifications based on their status and type with the date created in a separate Quality Alerts inbox
#*so that* I can have an overview and perform actions like view details on the notifications.
#
#h2. Outcome
#h2. Outcome
#
#- (-) New table is added which shows "Quality Alerts"

#Check if *edit* of quality notification is processed correctly which contains following checks:
# * create notification 
# * edit notification in status created
# * validate the values have been updated
@TRACEFOSS-3354 @TRACEFOSS-3373 @TRACEFOSS-3128 @TRACEFOSS-1920 @TRACEFOSS-2910 @TRACEFOSS-1101 @TRACEFOSS-1673 @TEST-904 @TRACEFOSS-2715 @TEST-1217 @INTEGRATION_TEST
@TRACEFOSS-3354 @TRACEFOSS-3373 @TRACEFOSS-3128 @TRACEFOSS-1920 @TRACEFOSS-2910 @TRACEFOSS-1101 @TRACEFOSS-1673 @TEST-904 @TRACEFOSS-2715 @TEST-1217 @INTEGRATION_TEST
Scenario: [BE] Check edit notification of quality notification
When I am logged into TRACE_X_A application
When I use assets with ids 'urn:uuid:1be6ec59-40fb-4993-9836-acb0e284fa02'
Expand All @@ -23,40 +23,42 @@ Feature: ⭐ [BE][QUALITY_ALERTS] Create (POST) quality alerts (Rest API)
| "description" | "Testing ACCEPTANCE TRACEFOSS-1864" |
| "type" | "ALERT" |
| "title" | "Initial title" |
| "receiverBpn" | "BPNL00000003CNKC" |
Then I check, if quality notification has proper values
| "description" | "Testing ACCEPTANCE TRACEFOSS-1864" |
| "status" | "CREATED" |
When I use assets with ids 'urn:uuid:1be6ec59-40fb-4993-9836-acb0e284fa03'
When I use assets with ids 'urn:uuid:1be6ec59-40fb-4993-9836-acb0e284fa03'
When I edit quality notification
| "severity" | "MINOR" |
| "description" | "Testing ACCEPTANCE TRACEFOSS-1864 edited" |
| "title" | "New Title" |

Then I check, if quality notification has proper values
| "status" | "CREATED" |
| "severity" | "MINOR" |
| "description" | "Testing ACCEPTANCE TRACEFOSS-1864 edited" |
| "title" | "New Title" |
| "affectedPartId" | "urn:uuid:1be6ec59-40fb-4993-9836-acb0e284fa03" |
| "affectedPartId" | "urn:uuid:1be6ec59-40fb-4993-9836-acb0e284fa03" |

#Check if *CANCELLATION* of quality alerts is processed correctly which contains following checks:
#* correct CANCELLATION on receiver side
#* correct reception of status update on sender side
#* correct reason on receiver and sender side
@TRACEFOSS-1864 @TRACEFOSS-3373 @TRACEFOSS-3128 @TRACEFOSS-2910 @TEST-1217 @TRACEFOSS-2715 @TEST-904 @TRACEFOSS-1920 @TRACEFOSS-1673 @TRACEFOSS-1101 @INTEGRATION_TEST @[QUALITY_ALERTS]
@TRACEFOSS-1864 @TRACEFOSS-3373 @TRACEFOSS-3128 @TRACEFOSS-2910 @TEST-1217 @TRACEFOSS-2715 @TEST-904 @TRACEFOSS-1920 @TRACEFOSS-1673 @TRACEFOSS-1101 @INTEGRATION_TEST @[QUALITY_ALERTS]
Scenario: [BE] Check correct processing of CANCELLATION of quality alerts
When I am logged into TRACE_X_A application
When I use assets with ids 'urn:uuid:1be6ec59-40fb-4993-9836-acb0e284fa02'
And I create quality notification
| "severity" | "MAJOR" |
| "description" | "Testing ACCEPTANCE TRACEFOSS-1864" |
| "type" | "ALERT" |
| "receiverBpn" | "BPNL00000003CNKC" |
Then I check, if quality notification has proper values
| "description" | "Testing ACCEPTANCE TRACEFOSS-1864" |
| "status" | "CREATED" |
When I cancel quality notification
Then I check, if quality notification has proper values
| "status" | "CANCELED" |

When I am logged into TRACE_X_B application
Then I check, if quality notification has not been received
When I am logged into TRACE_X_B application
Then I check, if quality notification has not been received
Loading

0 comments on commit 568805e

Please sign in to comment.