diff --git a/CHANGELOG.md b/CHANGELOG.md index 299bdea130..fda4454d66 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,9 +14,15 @@ _**For better traceability add the corresponding GitHub issue number in each cha ### Changed +### Removed + +- XXX Removed EdcNotifiactionMockServiceImpl class and replaced with mocks + ## [11.0.2 - 29.05.2024] ### Added - #1010 Made submodel path configurable +- #838 Added User experience > Table design section in arc42 documentation + ### Changed - #1010 Updated IRS Helm Version from 5.1.6 to 5.1.7 diff --git a/docs/src/docs/arc42/cross-cutting/development-concepts.adoc b/docs/src/docs/arc42/cross-cutting/development-concepts.adoc index f5d5d55e65..13edc14e50 100644 --- a/docs/src/docs/arc42/cross-cutting/development-concepts.adoc +++ b/docs/src/docs/arc42/cross-cutting/development-concepts.adoc @@ -65,12 +65,12 @@ We generally follow the link:https://developers.google.com/style[Google develope * Writing methods which provide a response to be better testable (avoid void if feasible). * Naming of unit tests are as follows: -image::https://raw.githubusercontent.com/eclipse-tractusx/traceability-foss/main/docs/src/images/arc42/user-guide/unit_test_naming.png[] +image::https://raw.githubusercontent.com/eclipse-tractusx/traceability-foss/main/docs/src/images/arc42/cross-cutting/unit_test_naming.png[] * Use given/when/then pattern for unit test structuring. E.g: -image::https://raw.githubusercontent.com/eclipse-tractusx/traceability-foss/main/docs/src/images/arc42/user-guide/given_when_then_pattern.png[] +image::https://raw.githubusercontent.com/eclipse-tractusx/traceability-foss/main/docs/src/images/arc42/cross-cutting/given_when_then_pattern.png[] === Integration testing @@ -87,7 +87,7 @@ We follow the rules and behaviour of: https://clean-code-developer.com/. As there is no other guideline of C-X, we fix any vulnerabilities, exposures, flaw detected by one of our SAST, DAST, Pentesting tools which is higher than "Very Low". -image::https://raw.githubusercontent.com/eclipse-tractusx/traceability-foss/main/docs/src/images/arc42/user-guide/vulnerability_level.png[] +image::https://raw.githubusercontent.com/eclipse-tractusx/traceability-foss/main/docs/src/images/arc42/cross-cutting/vulnerability_level.png[] == Trace-X technical class responsibilities diff --git a/docs/src/docs/arc42/cross-cutting/full.adoc b/docs/src/docs/arc42/cross-cutting/full.adoc index 251e461e1a..e7706e7e4a 100644 --- a/docs/src/docs/arc42/cross-cutting/full.adoc +++ b/docs/src/docs/arc42/cross-cutting/full.adoc @@ -7,3 +7,4 @@ include::architecture-design-patterns.adoc[leveloffset=+1] include::under-the-hood.adoc[leveloffset=+1] include::development-concepts.adoc[leveloffset=+1] include::operational-concepts.adoc[leveloffset=+1] +include::user-experience.adoc[leveloffset=+1] diff --git a/docs/src/docs/arc42/cross-cutting/index.adoc b/docs/src/docs/arc42/cross-cutting/index.adoc index 9efe86b982..a79ffadad9 100644 --- a/docs/src/docs/arc42/cross-cutting/index.adoc +++ b/docs/src/docs/arc42/cross-cutting/index.adoc @@ -7,3 +7,4 @@ - xref:under-the-hood.adoc["Under-the-hood" concepts] - xref:development-concepts.adoc[Development concepts] - xref:operational-concepts.adoc[Operational concepts] +- xref:user-experience.adoc[User experience] diff --git a/docs/src/docs/arc42/cross-cutting/user-experience.adoc b/docs/src/docs/arc42/cross-cutting/user-experience.adoc new file mode 100644 index 0000000000..8d297eb7af --- /dev/null +++ b/docs/src/docs/arc42/cross-cutting/user-experience.adoc @@ -0,0 +1,118 @@ += User experience + +== User interface + +=== Table design + +Trace-X uses the following table design to build consistent and user-friendly tables: + +image::https://raw.githubusercontent.com/eclipse-tractusx/traceability-foss/main/docs/src/images/arc42/cross-cutting/user-experience/table-design.png[] + +|=== +|Component |Description |Example + +|Actions +a|* Black icons +* When an action cannot be executed for any reason, the icon turns grey +* A tooltip is shown when hovering over an executable action to describe it +* A tooltip is shown when hovering over a disabled action to describe the reason why it can't be executed +|image:https://raw.githubusercontent.com/eclipse-tractusx/traceability-foss/main/docs/src/images/arc42/cross-cutting/user-experience/table-actions.png[] + +|Action menus +a|* Opens when clicking on a three-dot menu +* Disappears, when clicking anywhere outside the menu +* List of action icons with text labels +* The three-dot menu is sticky when used inside the table for single-item actions +|image:https://raw.githubusercontent.com/eclipse-tractusx/traceability-foss/main/docs/src/images/arc42/cross-cutting/user-experience/table-action-menus.png[] + +|Multi-select box +a|* Clicking on it when no items are selected, selects all items on the current page +* Clicking on it when some items are selected (but not all), selects all items on the current page +* Clicking on it when all items are selected, deselects all items on the current page +* Clicking on the small arrow opens a menu for clearing the page selection or the entire selection +* The menu disappears, when clicking anywhere outside the menu +* Part of the column header row -> Sticky on top next to column headers +|image:https://raw.githubusercontent.com/eclipse-tractusx/traceability-foss/main/docs/src/images/arc42/cross-cutting/user-experience/table-multi-select-box.png[] + +|Selection box +a|* Clicking on it toggles item selection +| + +|Selection count +a|* Shows selection count of the current page +| + +|Column header +a|* Shows the column title +* Hovering over it shows a tooltip that describes sorting behaviour +* Clicking on it toggles sorting +* Sticky on top +|image:https://raw.githubusercontent.com/eclipse-tractusx/traceability-foss/main/docs/src/images/arc42/cross-cutting/user-experience/table-sorting-tooltip.png[] +Ascending sorting: image:https://raw.githubusercontent.com/eclipse-tractusx/traceability-foss/main/docs/src/images/arc42/cross-cutting/user-experience/table-sorting-ascending.png[] +Descending sorting: image:https://raw.githubusercontent.com/eclipse-tractusx/traceability-foss/main/docs/src/images/arc42/cross-cutting/user-experience/table-sorting-descending.png[] + +|Filter +a|* Can search for any string +* Results are shown directly without having to press enter +* Results are shown as a sorted list (ascending) +* Selected results are shown on top of unselected ones +* The checkbox inside the search field selects or deselects every result +* The cross inside the search field resets the search and the filter +* When the filter is active, 'All' changes to the filtered value (+ the number of other filters) +* For date values, the search is replaced with a date picker +* Sticky on top below column headers +|image:https://raw.githubusercontent.com/eclipse-tractusx/traceability-foss/main/docs/src/images/arc42/cross-cutting/user-experience/table-filter.png[] +Date filter: image:https://raw.githubusercontent.com/eclipse-tractusx/traceability-foss/main/docs/src/images/arc42/cross-cutting/user-experience/table-filter-date.png[] + +|Quick filter +a|* Used to quickly filter for specific values +* Independent of regular filters +* Work exclusively - only one filter can be selected at a time +* Click on the currently active quick filter to deactivate it +| + +|Table column settings +a|* Opens up as an overlay +* Clicking on Save, the cross or anywhere outside the overlay will close the overlay (only saving changes when clicking Save) +* Selecting/deselecting columns makes them visible/invisible in the table +* The order of the columns can be changed by selecting the column title and using the arrow buttons +* Using the circle arrow icon resets the column visibility and column order +|image:https://raw.githubusercontent.com/eclipse-tractusx/traceability-foss/main/docs/src/images/arc42/cross-cutting/user-experience/table-column-settings.png[] + +|Full-width toggle +a|* Used to switch between full-width mode or variable-width mode +| + +|Scrollbars +a|* Only visible/active when data exceeds the visible space +* Sticky elements stay visible regardless of scroll position +| + +|Page size selector +a|* Shows the currently selected page size +* When clicking on it, a dropdown opens that shows available page size options +* Clicking any option will select that option and close the dropdown +* Clicking anywhere outside the dropdown closes the dropdown without applying any changes +* Three options are always available +|image:https://raw.githubusercontent.com/eclipse-tractusx/traceability-foss/main/docs/src/images/arc42/cross-cutting/user-experience/table-page-size-selector.png[] + +|Page information +a|* Shows information about the amount of items on the current page and the total amount of items +| + +|Page controls +a|* Used to switch between pages +* Controls are: First page, previous page, next page, last page +* Hovering over the controls shows a tooltip that labels each control +|image:https://raw.githubusercontent.com/eclipse-tractusx/traceability-foss/main/docs/src/images/arc42/cross-cutting/user-experience/table-page-controls.png[] +|=== + +In addition, following tables are used within Trace-X: + +When the data is not as complex and/or extensive and single-item actions are not needed: + +image::https://raw.githubusercontent.com/eclipse-tractusx/traceability-foss/main/docs/src/images/arc42/cross-cutting/user-experience/table-small.png[] + +When data must only be shown and no actions are needed: + +image::https://raw.githubusercontent.com/eclipse-tractusx/traceability-foss/main/docs/src/images/arc42/cross-cutting/user-experience/table-data-only.png[] diff --git a/docs/src/docs/user/user-manual.adoc b/docs/src/docs/user/user-manual.adoc index bbea356c33..19e2effc35 100644 --- a/docs/src/docs/user/user-manual.adoc +++ b/docs/src/docs/user/user-manual.adoc @@ -1,4 +1,4 @@ -= Users Manual += User manual == Notice @@ -23,7 +23,7 @@ A list of user or technical roles can be found below: Available roles: https://portal.int.demo.catena-x.net/appusermanagement/3bbc88ae-5f0d-45cb-ab3e-8c7602ff58b4 -image::https://raw.githubusercontent.com/eclipse-tractusx/traceability-foss/main/docs/src/images/user-manual/app_roles.png[] +image::https://raw.githubusercontent.com/eclipse-tractusx/traceability-foss/main/docs/src/images/user-manual/general-information/app_roles.png[] Assignment of roles: https://portal.int.demo.catena-x.net/documentation/?path=docs%2F03.+User+Management%2F02.+Modify+User+Account%2F03.+User+Permissions.md @@ -38,7 +38,7 @@ To enable users to access an application, minimum one application app need to ge Role details: https://portal.int.demo.catena-x.net/role-details -image::https://raw.githubusercontent.com/eclipse-tractusx/traceability-foss/main/docs/src/images/user-manual/cx_portal_roles.png[] +image::https://raw.githubusercontent.com/eclipse-tractusx/traceability-foss/main/docs/src/images/user-manual/general-information/cx_portal_roles.png[] User accounts: https://portal.int.demo.catena-x.net/documentation/?path=docs%2F03.+User+Management%2F01.+User+Account @@ -59,7 +59,7 @@ To login use the credentials provided by the hosting company. Navigation is done based on the top menu. -image::https://raw.githubusercontent.com/eclipse-tractusx/traceability-foss/main/docs/src/images/arc42/user-guide/navigation-overview.png[] +image::https://raw.githubusercontent.com/eclipse-tractusx/traceability-foss/main/docs/src/images/arc42/user-manual/navigation/navigation-overview.png[] === Dashboard @@ -98,7 +98,7 @@ In the Contracts view an admin user can view contract agreements and sort them b Also, it's possible to select contracts and export/download them as a .csv file. -image::https://raw.githubusercontent.com/eclipse-tractusx/traceability-foss/main/docs/src/images/arc42/user-guide/admin_contract_view.png[] +image::https://raw.githubusercontent.com/eclipse-tractusx/traceability-foss/main/docs/src/images/arc42/user-manual/navigation/admin_contract_view.png[] By clicking on the burger menu of a data row you can get to the detailed view of a contract. @@ -114,7 +114,7 @@ displayed in JSON format. Use the view selector to switch between JSON view and JSON tree view. Expand the policy details card on the right upper side for full-width display. -image::https://raw.githubusercontent.com/eclipse-tractusx/traceability-foss/main/docs/src/images/arc42/user-guide/admin_contract_detailed_view.png[] +image::https://raw.githubusercontent.com/eclipse-tractusx/traceability-foss/main/docs/src/images/arc42/user-manual/navigation/admin_contract_detailed_view.png[] ==== Data import functionality @@ -127,7 +127,7 @@ As you can see in the picture below, you can select a file to import and click o Find the example file at the following link: https://raw.githubusercontent.com/eclipse-tractusx/traceability-foss/main/tx-backend/testdata/import-test-data-CML1_v0.0.12.json -image::https://raw.githubusercontent.com/eclipse-tractusx/traceability-foss/main/docs/src/images/arc42/user-guide/admin_upload_file.png[] +image::https://raw.githubusercontent.com/eclipse-tractusx/traceability-foss/main/docs/src/images/arc42/user-manual/navigation/admin_upload_file.png[] The system will validate the file content. Upon successful validation, assets will be saved as either "AssetAsPlanned" or "AssetAsBuilt", with the import state set to "transient." @@ -137,7 +137,7 @@ Sign out the current user and return to the Catena-X portal. === Language -image:https://raw.githubusercontent.com/eclipse-tractusx/traceability-foss/main/docs/src/images/arc42/user-guide/language-icon.png[] Change language. + +image:https://raw.githubusercontent.com/eclipse-tractusx/traceability-foss/main/docs/src/images/arc42/user-manual/navigation/language-icon.png[] Change language. + Supported languages: * English @@ -148,7 +148,7 @@ Supported languages: List view of the own manufactured (asBuilt) or planned (asPlanned) parts and batches as well as supplier/customer parts. You can adjust the view of tables by clicking on the fullscreen icon to maximize or minimize the view to the half of the full width. -image::https://raw.githubusercontent.com/eclipse-tractusx/traceability-foss/main/docs/src/images/arc42/user-guide/parts-list-view.png[] +image::https://raw.githubusercontent.com/eclipse-tractusx/traceability-foss/main/docs/src/images/arc42/user-manual/parts/parts-list-view.png[] === Parts table @@ -164,7 +164,7 @@ The global search bar at the top returns part results from both tables. Choosing the filter input field for any column and typing in any character will show filter suggestions. -image::https://raw.githubusercontent.com/eclipse-tractusx/traceability-foss/main/docs/src/images/arc42/user-guide/parts-autosuggestion-filtering.png[] +image::https://raw.githubusercontent.com/eclipse-tractusx/traceability-foss/main/docs/src/images/arc42/user-manual/parts/parts-autosuggestion-filtering.png[] === AsBuilt lifecycle parts @@ -195,12 +195,12 @@ Parts which exist in a quality notification will be highlighted as a yellow colo Select one or multiple parts that are in the AsBuilt lifecycle. A button will appear on the right of the lifecycle view selection: -image::https://raw.githubusercontent.com/eclipse-tractusx/traceability-foss/main/docs/src/images/arc42/user-guide/publish_assets_button.png[] +image::https://raw.githubusercontent.com/eclipse-tractusx/traceability-foss/main/docs/src/images/arc42/user-manual/parts/publish_assets_button.png[] Selection will enable you to publish assets with the goal to persist them (import state "persistent"). With a click on the button a window will be opened, where the selected assets are displayed and a required policy must be selected: -image::https://raw.githubusercontent.com/eclipse-tractusx/traceability-foss/main/docs/src/images/arc42/user-guide/publish_assets_view.png[] +image::https://raw.githubusercontent.com/eclipse-tractusx/traceability-foss/main/docs/src/images/arc42/user-manual/parts/publish_assets_view.png[] The following table explains the different import state an asset can have: @@ -230,7 +230,7 @@ The following table explains the different import state an asset can have: On the right upper site of a table there is a settings icon in which you can set the table columns to a desired view. With a click on it a dialog opens where you can change the settings of the corresponding table: -image::https://raw.githubusercontent.com/eclipse-tractusx/traceability-foss/main/docs/src/images/arc42/user-guide/other-parts-table-settings-dialog.png[] +image::https://raw.githubusercontent.com/eclipse-tractusx/traceability-foss/main/docs/src/images/arc42/user-manual/parts/other-parts-table-settings-dialog.png[] Hide/show table columns by clicking on the checkbox or the column name. It is possible to hide/show all columns by clicking on the "All" - checkbox. @@ -250,7 +250,7 @@ The settings will be stored in the local storage of the browser and will be pers To open the detail view, click on the three dots icon of the desired item and select "View details". More detailed information on the asset is listed as well as a part tree that visually shows the parts relations. -image::https://raw.githubusercontent.com/eclipse-tractusx/traceability-foss/main/docs/src/images/arc42/user-guide/parts-list-detailed-view.png[] +image::https://raw.githubusercontent.com/eclipse-tractusx/traceability-foss/main/docs/src/images/arc42/user-manual/parts/parts-list-detailed-view.png[] ==== Overview @@ -267,7 +267,7 @@ A yellow border indicates that the part is a piece of a batch. It is possible to adjust the view of the relationships by dragging the mouse to the desired view. Zooming in/out can be done with the corresponding control buttons. -image:https://raw.githubusercontent.com/eclipse-tractusx/traceability-foss/main/docs/src/images/arc42/user-guide/open-new-tab.png[] Open part tree in new tab to zoom, scroll and focus in a larger view. +image:https://raw.githubusercontent.com/eclipse-tractusx/traceability-foss/main/docs/src/images/arc42/user-manual/parts/open-new-tab.png[] Open part tree in new tab to zoom, scroll and focus in a larger view. A minimap on the bottom right provides an overview of the current position on the part tree. ==== Asset state @@ -303,7 +303,7 @@ a tooltip will provide information explaining the reason. You can trigger the to To open the detail view, click on the three dots icon of the desired item from the parts table and select "View details". More detailed information on the asset is listed. -image::https://raw.githubusercontent.com/eclipse-tractusx/traceability-foss/main/docs/src/images/arc42/user-guide/supplier-parts-list-detailed-view.png[] +image::https://raw.githubusercontent.com/eclipse-tractusx/traceability-foss/main/docs/src/images/arc42/user-manual/parts/supplier-parts-list-detailed-view.png[] ==== Overview @@ -328,7 +328,7 @@ Customer Parts that are in a quality alert are highlighted yellow. To open the detail view, click on the three dots icon of the desired item and select "View details". More detailed information on the asset is listed. -image::https://raw.githubusercontent.com/eclipse-tractusx/traceability-foss/main/docs/src/images/arc42/user-guide/customer-parts-list-detailed-view.png[] +image::https://raw.githubusercontent.com/eclipse-tractusx/traceability-foss/main/docs/src/images/arc42/user-manual/parts/customer-parts-list-detailed-view.png[] ==== Overview @@ -347,20 +347,20 @@ Information about the identifiers at the customer for the respective part/batch. Inbox for received/sent quality notifications. -image:https://raw.githubusercontent.com/eclipse-tractusx/traceability-foss/main/docs/src/images/arc42/user-guide/investigations-list-view.png[] +image:https://raw.githubusercontent.com/eclipse-tractusx/traceability-foss/main/docs/src/images/arc42/user-manual/quality-notifications/investigations-list-view.png[] The tables can be sorted, filtered and searched. Choosing the filter input field for any column and typing in any character will show filter suggestions. -image:https://raw.githubusercontent.com/eclipse-tractusx/traceability-foss/main/docs/src/images/arc42/user-guide/investigations-autosuggestion-filtering.png[] +image:https://raw.githubusercontent.com/eclipse-tractusx/traceability-foss/main/docs/src/images/arc42/user-manual/quality-notifications/investigations-autosuggestion-filtering.png[] -image:https://raw.githubusercontent.com/eclipse-tractusx/traceability-foss/main/docs/src/images/arc42/user-guide/notification-drafts.png[] Received quality notifications. +image:https://raw.githubusercontent.com/eclipse-tractusx/traceability-foss/main/docs/src/images/arc42/user-manual/quality-notifications/notification-drafts.png[] Received quality notifications. Quality notifications received by a customer. Those notifications specify a defect or request to investigate on a specific part / batch on your side and give feedback to the customer. -image:https://raw.githubusercontent.com/eclipse-tractusx/traceability-foss/main/docs/src/images/arc42/user-guide/notification-send.png[] Sent quality notifications. +image:https://raw.githubusercontent.com/eclipse-tractusx/traceability-foss/main/docs/src/images/arc42/user-manual/quality-notifications/notification-send.png[] Sent quality notifications. Notifications in the context of quality investigations that are in queued/draft status or already requested/sent to the supplier. Those notifications specify a defect or request to investigate on a specific part / batch on your suppliers side and give feedback back to you. @@ -389,7 +389,7 @@ Notifications can be selected with the checkboxes on the left of the table. With the selection, there is a context menu for actions on mulitple (selected) notifications. The "more" menu is opened by clicking on the horizontally aligned three dots icon. -image:https://raw.githubusercontent.com/eclipse-tractusx/traceability-foss/main/docs/src/images/arc42/user-guide/inbox-multiselect-actions.png[] +image:https://raw.githubusercontent.com/eclipse-tractusx/traceability-foss/main/docs/src/images/arc42/user-manual/quality-notifications/inbox-multiselect-actions.png[] === Quality notification create/edit view @@ -400,7 +400,7 @@ A quality notification can be started by the following options: A quality notification can be edited by clicking on the context menu on an item within the inbox. -image:https://raw.githubusercontent.com/eclipse-tractusx/traceability-foss/main/docs/src/images/arc42/user-guide/investigation-create-view.png[] +image:https://raw.githubusercontent.com/eclipse-tractusx/traceability-foss/main/docs/src/images/arc42/user-manual/quality-notifications/investigation-create-view.png[] === Quality notifications context action @@ -409,11 +409,11 @@ Select the three dots icon on the right side of an quality notification entry to From there it is possible to open the quality notification detailed view or change the status of it. Only the possible status transition will show up. -image:https://raw.githubusercontent.com/eclipse-tractusx/traceability-foss/main/docs/src/images/arc42/user-guide/notification-context-action.png[] +image:https://raw.githubusercontent.com/eclipse-tractusx/traceability-foss/main/docs/src/images/arc42/user-manual/quality-notifications/notification-context-action.png[] Changing the status of a quality notification will open a modal in which the details to the status change can be provided and completed. -image:https://raw.githubusercontent.com/eclipse-tractusx/traceability-foss/main/docs/src/images/arc42/user-guide/investigation-context-action-modal.png[] +image:https://raw.githubusercontent.com/eclipse-tractusx/traceability-foss/main/docs/src/images/arc42/user-manual/quality-notifications/investigation-context-action-modal.png[] A pop-up will notify you if the status transition was successful. @@ -421,7 +421,7 @@ A pop-up will notify you if the status transition was successful. The quality notification detail view can be opened by selecting the corresponding option in the context menu. -image:https://raw.githubusercontent.com/eclipse-tractusx/traceability-foss/main/docs/src/images/arc42/user-guide/investigation-detail-view.png[] +image:https://raw.githubusercontent.com/eclipse-tractusx/traceability-foss/main/docs/src/images/arc42/user-manual/quality-notifications/investigation-detail-view.png[] ==== Overview @@ -491,4 +491,4 @@ The receiver can never change the status to closed. The legend in the below state diagram describes who can set the status. One exception to this rule: the transition from status SENT to status RECEIVED is done automatically once the sender receives the Http status code 201. -image::https://raw.githubusercontent.com/eclipse-tractusx/traceability-foss/main/docs/src/images/arc42/user-guide/notificationstatemodel.png[Notification state model] +image::https://raw.githubusercontent.com/eclipse-tractusx/traceability-foss/main/docs/src/images/arc42/user-manual/quality-notifications/notificationstatemodel.png[Notification state model] diff --git a/docs/src/images/arc42/user-guide/given_when_then_pattern.png b/docs/src/images/arc42/cross-cutting/given_when_then_pattern.png similarity index 100% rename from docs/src/images/arc42/user-guide/given_when_then_pattern.png rename to docs/src/images/arc42/cross-cutting/given_when_then_pattern.png diff --git a/docs/src/images/arc42/user-guide/unit_test_naming.png b/docs/src/images/arc42/cross-cutting/unit_test_naming.png similarity index 100% rename from docs/src/images/arc42/user-guide/unit_test_naming.png rename to docs/src/images/arc42/cross-cutting/unit_test_naming.png diff --git a/docs/src/images/arc42/cross-cutting/user-experience/table-action-menus.png b/docs/src/images/arc42/cross-cutting/user-experience/table-action-menus.png new file mode 100644 index 0000000000..a740512f50 Binary files /dev/null and b/docs/src/images/arc42/cross-cutting/user-experience/table-action-menus.png differ diff --git a/docs/src/images/arc42/cross-cutting/user-experience/table-actions.png b/docs/src/images/arc42/cross-cutting/user-experience/table-actions.png new file mode 100644 index 0000000000..75c5ae5a6a Binary files /dev/null and b/docs/src/images/arc42/cross-cutting/user-experience/table-actions.png differ diff --git a/docs/src/images/arc42/cross-cutting/user-experience/table-column-settings.png b/docs/src/images/arc42/cross-cutting/user-experience/table-column-settings.png new file mode 100644 index 0000000000..27c1051c28 Binary files /dev/null and b/docs/src/images/arc42/cross-cutting/user-experience/table-column-settings.png differ diff --git a/docs/src/images/arc42/cross-cutting/user-experience/table-data-only.png b/docs/src/images/arc42/cross-cutting/user-experience/table-data-only.png new file mode 100644 index 0000000000..0b35d3ed3d Binary files /dev/null and b/docs/src/images/arc42/cross-cutting/user-experience/table-data-only.png differ diff --git a/docs/src/images/arc42/cross-cutting/user-experience/table-design.png b/docs/src/images/arc42/cross-cutting/user-experience/table-design.png new file mode 100644 index 0000000000..a47531b945 Binary files /dev/null and b/docs/src/images/arc42/cross-cutting/user-experience/table-design.png differ diff --git a/docs/src/images/arc42/cross-cutting/user-experience/table-filter-date.png b/docs/src/images/arc42/cross-cutting/user-experience/table-filter-date.png new file mode 100644 index 0000000000..dbd8e6cbb2 Binary files /dev/null and b/docs/src/images/arc42/cross-cutting/user-experience/table-filter-date.png differ diff --git a/docs/src/images/arc42/cross-cutting/user-experience/table-filter.png b/docs/src/images/arc42/cross-cutting/user-experience/table-filter.png new file mode 100644 index 0000000000..1d0009687f Binary files /dev/null and b/docs/src/images/arc42/cross-cutting/user-experience/table-filter.png differ diff --git a/docs/src/images/arc42/cross-cutting/user-experience/table-multi-select-box.png b/docs/src/images/arc42/cross-cutting/user-experience/table-multi-select-box.png new file mode 100644 index 0000000000..86f794d655 Binary files /dev/null and b/docs/src/images/arc42/cross-cutting/user-experience/table-multi-select-box.png differ diff --git a/docs/src/images/arc42/cross-cutting/user-experience/table-page-controls.png b/docs/src/images/arc42/cross-cutting/user-experience/table-page-controls.png new file mode 100644 index 0000000000..804a5ce0da Binary files /dev/null and b/docs/src/images/arc42/cross-cutting/user-experience/table-page-controls.png differ diff --git a/docs/src/images/arc42/cross-cutting/user-experience/table-page-size-selector.png b/docs/src/images/arc42/cross-cutting/user-experience/table-page-size-selector.png new file mode 100644 index 0000000000..bad0c76646 Binary files /dev/null and b/docs/src/images/arc42/cross-cutting/user-experience/table-page-size-selector.png differ diff --git a/docs/src/images/arc42/cross-cutting/user-experience/table-small.png b/docs/src/images/arc42/cross-cutting/user-experience/table-small.png new file mode 100644 index 0000000000..eb4bfcb240 Binary files /dev/null and b/docs/src/images/arc42/cross-cutting/user-experience/table-small.png differ diff --git a/docs/src/images/arc42/cross-cutting/user-experience/table-sorting-ascending.png b/docs/src/images/arc42/cross-cutting/user-experience/table-sorting-ascending.png new file mode 100644 index 0000000000..d57fe2e4d9 Binary files /dev/null and b/docs/src/images/arc42/cross-cutting/user-experience/table-sorting-ascending.png differ diff --git a/docs/src/images/arc42/cross-cutting/user-experience/table-sorting-descending.png b/docs/src/images/arc42/cross-cutting/user-experience/table-sorting-descending.png new file mode 100644 index 0000000000..87d9d9c1cb Binary files /dev/null and b/docs/src/images/arc42/cross-cutting/user-experience/table-sorting-descending.png differ diff --git a/docs/src/images/arc42/cross-cutting/user-experience/table-sorting-tooltip.png b/docs/src/images/arc42/cross-cutting/user-experience/table-sorting-tooltip.png new file mode 100644 index 0000000000..74b649a311 Binary files /dev/null and b/docs/src/images/arc42/cross-cutting/user-experience/table-sorting-tooltip.png differ diff --git a/docs/src/images/arc42/user-guide/vulnerability_level.png b/docs/src/images/arc42/cross-cutting/vulnerability_level.png similarity index 100% rename from docs/src/images/arc42/user-guide/vulnerability_level.png rename to docs/src/images/arc42/cross-cutting/vulnerability_level.png diff --git a/docs/src/images/arc42/user-guide/supplier-parts-list-detailed-view.png b/docs/src/images/arc42/user-guide/supplier-parts-list-detailed-view.png deleted file mode 100644 index 6af1d92975..0000000000 Binary files a/docs/src/images/arc42/user-guide/supplier-parts-list-detailed-view.png and /dev/null differ diff --git a/docs/src/images/user-manual/app_roles.png b/docs/src/images/user-manual/general-information/app_roles.png similarity index 100% rename from docs/src/images/user-manual/app_roles.png rename to docs/src/images/user-manual/general-information/app_roles.png diff --git a/docs/src/images/user-manual/assign_app_roles.png b/docs/src/images/user-manual/general-information/assign_app_roles.png similarity index 100% rename from docs/src/images/user-manual/assign_app_roles.png rename to docs/src/images/user-manual/general-information/assign_app_roles.png diff --git a/docs/src/images/user-manual/cx_portal_roles.png b/docs/src/images/user-manual/general-information/cx_portal_roles.png similarity index 100% rename from docs/src/images/user-manual/cx_portal_roles.png rename to docs/src/images/user-manual/general-information/cx_portal_roles.png diff --git a/docs/src/images/arc42/user-guide/admin_contract_detailed_view.png b/docs/src/images/user-manual/navigation/admin_contract_detailed_view.png similarity index 100% rename from docs/src/images/arc42/user-guide/admin_contract_detailed_view.png rename to docs/src/images/user-manual/navigation/admin_contract_detailed_view.png diff --git a/docs/src/images/arc42/user-guide/admin_contract_view.png b/docs/src/images/user-manual/navigation/admin_contract_view.png similarity index 100% rename from docs/src/images/arc42/user-guide/admin_contract_view.png rename to docs/src/images/user-manual/navigation/admin_contract_view.png diff --git a/docs/src/images/arc42/user-guide/admin_upload_file.png b/docs/src/images/user-manual/navigation/admin_upload_file.png similarity index 100% rename from docs/src/images/arc42/user-guide/admin_upload_file.png rename to docs/src/images/user-manual/navigation/admin_upload_file.png diff --git a/docs/src/images/arc42/user-guide/dashboard.png b/docs/src/images/user-manual/navigation/dashboard.png similarity index 100% rename from docs/src/images/arc42/user-guide/dashboard.png rename to docs/src/images/user-manual/navigation/dashboard.png diff --git a/docs/src/images/arc42/user-guide/language-icon.png b/docs/src/images/user-manual/navigation/language-icon.png similarity index 100% rename from docs/src/images/arc42/user-guide/language-icon.png rename to docs/src/images/user-manual/navigation/language-icon.png diff --git a/docs/src/images/arc42/user-guide/navigation-overview.png b/docs/src/images/user-manual/navigation/navigation-overview.png similarity index 100% rename from docs/src/images/arc42/user-guide/navigation-overview.png rename to docs/src/images/user-manual/navigation/navigation-overview.png diff --git a/docs/src/images/arc42/user-guide/customer-parts-list-detailed-view.png b/docs/src/images/user-manual/parts/customer-parts-list-detailed-view.png similarity index 100% rename from docs/src/images/arc42/user-guide/customer-parts-list-detailed-view.png rename to docs/src/images/user-manual/parts/customer-parts-list-detailed-view.png diff --git a/docs/src/images/arc42/user-guide/open-new-tab.png b/docs/src/images/user-manual/parts/open-new-tab.png similarity index 100% rename from docs/src/images/arc42/user-guide/open-new-tab.png rename to docs/src/images/user-manual/parts/open-new-tab.png diff --git a/docs/src/images/arc42/user-guide/other-parts-autosuggestion-filtering.png b/docs/src/images/user-manual/parts/other-parts-autosuggestion-filtering.png similarity index 100% rename from docs/src/images/arc42/user-guide/other-parts-autosuggestion-filtering.png rename to docs/src/images/user-manual/parts/other-parts-autosuggestion-filtering.png diff --git a/docs/src/images/arc42/user-guide/other-parts-list-view.png b/docs/src/images/user-manual/parts/other-parts-list-view.png similarity index 100% rename from docs/src/images/arc42/user-guide/other-parts-list-view.png rename to docs/src/images/user-manual/parts/other-parts-list-view.png diff --git a/docs/src/images/arc42/user-guide/other-parts-table-settings-dialog.png b/docs/src/images/user-manual/parts/other-parts-table-settings-dialog.png similarity index 100% rename from docs/src/images/arc42/user-guide/other-parts-table-settings-dialog.png rename to docs/src/images/user-manual/parts/other-parts-table-settings-dialog.png diff --git a/docs/src/images/arc42/user-guide/parts-autosuggestion-filtering.png b/docs/src/images/user-manual/parts/parts-autosuggestion-filtering.png similarity index 100% rename from docs/src/images/arc42/user-guide/parts-autosuggestion-filtering.png rename to docs/src/images/user-manual/parts/parts-autosuggestion-filtering.png diff --git a/docs/src/images/arc42/user-guide/parts-list-detailed-view.png b/docs/src/images/user-manual/parts/parts-list-detailed-view.png similarity index 100% rename from docs/src/images/arc42/user-guide/parts-list-detailed-view.png rename to docs/src/images/user-manual/parts/parts-list-detailed-view.png diff --git a/docs/src/images/arc42/user-guide/parts-list-view.png b/docs/src/images/user-manual/parts/parts-list-view.png similarity index 100% rename from docs/src/images/arc42/user-guide/parts-list-view.png rename to docs/src/images/user-manual/parts/parts-list-view.png diff --git a/docs/src/images/arc42/user-guide/parts-table-settings-dialog.png b/docs/src/images/user-manual/parts/parts-table-settings-dialog.png similarity index 100% rename from docs/src/images/arc42/user-guide/parts-table-settings-dialog.png rename to docs/src/images/user-manual/parts/parts-table-settings-dialog.png diff --git a/docs/src/images/arc42/user-guide/publish_assets_button.png b/docs/src/images/user-manual/parts/publish_assets_button.png similarity index 100% rename from docs/src/images/arc42/user-guide/publish_assets_button.png rename to docs/src/images/user-manual/parts/publish_assets_button.png diff --git a/docs/src/images/arc42/user-guide/publish_assets_view.png b/docs/src/images/user-manual/parts/publish_assets_view.png similarity index 100% rename from docs/src/images/arc42/user-guide/publish_assets_view.png rename to docs/src/images/user-manual/parts/publish_assets_view.png diff --git a/docs/src/images/user-manual/parts/supplier-parts-list-detailed-view.png b/docs/src/images/user-manual/parts/supplier-parts-list-detailed-view.png new file mode 100644 index 0000000000..2084185eb2 Binary files /dev/null and b/docs/src/images/user-manual/parts/supplier-parts-list-detailed-view.png differ diff --git a/docs/src/images/arc42/user-guide/alert-context-action-modal.png b/docs/src/images/user-manual/quality-notifications/alert-context-action-modal.png similarity index 100% rename from docs/src/images/arc42/user-guide/alert-context-action-modal.png rename to docs/src/images/user-manual/quality-notifications/alert-context-action-modal.png diff --git a/docs/src/images/arc42/user-guide/alert-detail-view.png b/docs/src/images/user-manual/quality-notifications/alert-detail-view.png similarity index 100% rename from docs/src/images/arc42/user-guide/alert-detail-view.png rename to docs/src/images/user-manual/quality-notifications/alert-detail-view.png diff --git a/docs/src/images/arc42/user-guide/alerts-autosuggestion-filtering.png b/docs/src/images/user-manual/quality-notifications/alerts-autosuggestion-filtering.png similarity index 100% rename from docs/src/images/arc42/user-guide/alerts-autosuggestion-filtering.png rename to docs/src/images/user-manual/quality-notifications/alerts-autosuggestion-filtering.png diff --git a/docs/src/images/arc42/user-guide/alerts-list-view.png b/docs/src/images/user-manual/quality-notifications/alerts-list-view.png similarity index 100% rename from docs/src/images/arc42/user-guide/alerts-list-view.png rename to docs/src/images/user-manual/quality-notifications/alerts-list-view.png diff --git a/docs/src/images/arc42/user-guide/inbox-multiselect-actions.png b/docs/src/images/user-manual/quality-notifications/inbox-multiselect-actions.png similarity index 100% rename from docs/src/images/arc42/user-guide/inbox-multiselect-actions.png rename to docs/src/images/user-manual/quality-notifications/inbox-multiselect-actions.png diff --git a/docs/src/images/arc42/user-guide/investigation-context-action-modal.png b/docs/src/images/user-manual/quality-notifications/investigation-context-action-modal.png similarity index 100% rename from docs/src/images/arc42/user-guide/investigation-context-action-modal.png rename to docs/src/images/user-manual/quality-notifications/investigation-context-action-modal.png diff --git a/docs/src/images/arc42/user-guide/investigation-create-view.png b/docs/src/images/user-manual/quality-notifications/investigation-create-view.png similarity index 100% rename from docs/src/images/arc42/user-guide/investigation-create-view.png rename to docs/src/images/user-manual/quality-notifications/investigation-create-view.png diff --git a/docs/src/images/arc42/user-guide/investigation-detail-view.png b/docs/src/images/user-manual/quality-notifications/investigation-detail-view.png similarity index 100% rename from docs/src/images/arc42/user-guide/investigation-detail-view.png rename to docs/src/images/user-manual/quality-notifications/investigation-detail-view.png diff --git a/docs/src/images/arc42/user-guide/investigations-autosuggestion-filtering.png b/docs/src/images/user-manual/quality-notifications/investigations-autosuggestion-filtering.png similarity index 100% rename from docs/src/images/arc42/user-guide/investigations-autosuggestion-filtering.png rename to docs/src/images/user-manual/quality-notifications/investigations-autosuggestion-filtering.png diff --git a/docs/src/images/arc42/user-guide/investigations-list-view.png b/docs/src/images/user-manual/quality-notifications/investigations-list-view.png similarity index 100% rename from docs/src/images/arc42/user-guide/investigations-list-view.png rename to docs/src/images/user-manual/quality-notifications/investigations-list-view.png diff --git a/docs/src/images/arc42/user-guide/notification-context-action.png b/docs/src/images/user-manual/quality-notifications/notification-context-action.png similarity index 100% rename from docs/src/images/arc42/user-guide/notification-context-action.png rename to docs/src/images/user-manual/quality-notifications/notification-context-action.png diff --git a/docs/src/images/arc42/user-guide/notification-drafts.png b/docs/src/images/user-manual/quality-notifications/notification-drafts.png similarity index 100% rename from docs/src/images/arc42/user-guide/notification-drafts.png rename to docs/src/images/user-manual/quality-notifications/notification-drafts.png diff --git a/docs/src/images/arc42/user-guide/notification-send.png b/docs/src/images/user-manual/quality-notifications/notification-send.png similarity index 100% rename from docs/src/images/arc42/user-guide/notification-send.png rename to docs/src/images/user-manual/quality-notifications/notification-send.png diff --git a/docs/src/images/arc42/user-guide/notificationstatemodel.png b/docs/src/images/user-manual/quality-notifications/notificationstatemodel.png similarity index 100% rename from docs/src/images/arc42/user-guide/notificationstatemodel.png rename to docs/src/images/user-manual/quality-notifications/notificationstatemodel.png diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/infrastructure/base/irs/PolicyRepositoryImpl.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/infrastructure/base/irs/PolicyRepositoryImpl.java index c16e4c8f4c..b28d014020 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/infrastructure/base/irs/PolicyRepositoryImpl.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/infrastructure/base/irs/PolicyRepositoryImpl.java @@ -67,7 +67,6 @@ public void createIrsPolicyIfMissing() { private IrsPolicyResponse findMatchingPolicy(List irsPolicies) { return irsPolicies.stream() .filter(irsPolicy -> { - // Logging all policy constraints irsPolicy.payload().policy().getPermissions().forEach(permission -> { Constraints constraint = permission.getConstraint(); if (constraint != null) { diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/common/config/PolicyStartUpConfig.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/common/config/PolicyStartUpConfig.java index c9947bdadf..733cd41f4b 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/common/config/PolicyStartUpConfig.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/common/config/PolicyStartUpConfig.java @@ -42,7 +42,6 @@ import org.springframework.boot.context.properties.EnableConfigurationProperties; import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Lazy; -import org.springframework.context.annotation.Profile; import org.springframework.data.jpa.repository.config.EnableJpaRepositories; import org.springframework.scheduling.annotation.EnableAsync; import org.springframework.web.servlet.config.annotation.EnableWebMvc; @@ -52,8 +51,6 @@ import java.util.List; import java.util.UUID; -import static org.eclipse.tractusx.traceability.common.config.ApplicationProfiles.NOT_INTEGRATION_TESTS; - @Configuration @ConfigurationPropertiesScan(basePackages = "org.eclipse.tractusx.traceability.*") @EnableWebMvc @@ -62,7 +59,6 @@ @Slf4j @EnableJpaRepositories(basePackages = "org.eclipse.tractusx.traceability.*") @RequiredArgsConstructor -@Profile(NOT_INTEGRATION_TESTS) public class PolicyStartUpConfig { private final AcceptedPoliciesProvider.DefaultAcceptedPoliciesProvider defaultAcceptedPoliciesProvider; diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/discovery/infrastructure/repository/FeignDiscoveryRepositoryImpl.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/discovery/infrastructure/repository/FeignDiscoveryRepositoryImpl.java index 9adbff4a9a..689572c879 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/discovery/infrastructure/repository/FeignDiscoveryRepositoryImpl.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/discovery/infrastructure/repository/FeignDiscoveryRepositoryImpl.java @@ -45,7 +45,7 @@ public class FeignDiscoveryRepositoryImpl implements DiscoveryRepository { @Override public Optional retrieveDiscoveryByFinderAndEdcDiscoveryService(String bpn) { - DiscoveryFinderRequest request = new DiscoveryFinderRequest(List.of("bpn")); + DiscoveryFinderRequest request = new DiscoveryFinderRequest(List.of(bpn)); DiscoveryResponse discoveryEndpoints = discoveryFinderClient.findDiscoveryEndpoints(request); List discoveryResults = new ArrayList<>(); discoveryEndpoints.endpoints().forEach(discoveryEndpoint -> { diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/notification/domain/base/service/EdcNotificationMockServiceImpl.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/notification/domain/base/service/EdcNotificationMockServiceImpl.java deleted file mode 100644 index 70929eeb64..0000000000 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/notification/domain/base/service/EdcNotificationMockServiceImpl.java +++ /dev/null @@ -1,41 +0,0 @@ -/******************************************************************************** - * Copyright (c) 2023 Contributors to the Eclipse Foundation - * - * See the NOTICE file(s) distributed with this work for additional - * information regarding copyright ownership. - * - * This program and the accompanying materials are made available under the - * terms of the Apache License, Version 2.0 which is available at - * https://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - * SPDX-License-Identifier: Apache-2.0 - ********************************************************************************/ - -package org.eclipse.tractusx.traceability.notification.domain.base.service; - - -import lombok.extern.slf4j.Slf4j; -import org.eclipse.tractusx.traceability.notification.domain.base.model.NotificationMessage; -import org.springframework.context.annotation.Profile; -import org.springframework.stereotype.Service; - -import java.util.concurrent.CompletableFuture; - -import static org.eclipse.tractusx.traceability.common.config.ApplicationProfiles.INTEGRATION_SPRING_BOOT; - -@Slf4j -@Service -@Profile(INTEGRATION_SPRING_BOOT) -public class EdcNotificationMockServiceImpl implements EdcNotificationService { - @Override - public CompletableFuture asyncNotificationMessageExecutor(NotificationMessage message) { - log.info("EdcNotificationMockServiceImpl: {}", message); - return CompletableFuture.completedFuture(message); - } -} diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/notification/domain/base/service/EdcNotificationServiceImpl.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/notification/domain/base/service/EdcNotificationServiceImpl.java index 3dc8a9e8ee..edc84fefbb 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/notification/domain/base/service/EdcNotificationServiceImpl.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/notification/domain/base/service/EdcNotificationServiceImpl.java @@ -36,7 +36,6 @@ import org.eclipse.tractusx.traceability.notification.domain.base.model.NotificationMessage; import org.eclipse.tractusx.traceability.notification.domain.base.model.NotificationType; import org.eclipse.tractusx.traceability.notification.domain.notification.repository.NotificationRepository; -import org.springframework.context.annotation.Profile; import org.springframework.scheduling.annotation.Async; import org.springframework.stereotype.Service; @@ -45,13 +44,11 @@ import java.util.concurrent.CompletableFuture; import static org.apache.commons.collections4.ListUtils.emptyIfNull; -import static org.eclipse.tractusx.traceability.common.config.ApplicationProfiles.NOT_INTEGRATION_TESTS; @Slf4j @RequiredArgsConstructor @Service @Transactional(dontRollbackOn = DiscoveryFinderException.class) -@Profile(NOT_INTEGRATION_TESTS) public class EdcNotificationServiceImpl implements EdcNotificationService { private final NotificationsEDCFacade edcFacade; diff --git a/tx-backend/src/main/resources/application-integration-spring-boot.yml b/tx-backend/src/main/resources/application-integration-spring-boot.yml index d62c4b4ba6..01de3c8a48 100644 --- a/tx-backend/src/main/resources/application-integration-spring-boot.yml +++ b/tx-backend/src/main/resources/application-integration-spring-boot.yml @@ -22,13 +22,13 @@ traceability: bpn: BPNL00000003AXS3 url: localhost:${server.port}/api - leftOperand: "PURPOSE" + leftOperand: "cx-policy:FrameworkAgreement" operatorType: "eq" - rightOperand: "ID Trace 3.1" - leftOperandSecond: "PURPOSE2" + rightOperand: "traceability:1.0" + leftOperandSecond: "cx-policy:UsagePurpose" operatorTypeSecond: "eq" - rightOperandSecond: "ID Trace 3.2" - validUntil: "2023-07-04T16:01:05.309Z" + rightOperandSecond: "cx.core.industrycore:1" + validUntil: "2040-07-04T16:01:05.309Z" adminApiKey: testAdminKey regularApiKey: testRegularKey irsBase: "http://127.0.0.1" diff --git a/tx-backend/src/test/java/org/eclipse/tractusx/traceability/integration/common/config/RestitoConfig.java b/tx-backend/src/test/java/org/eclipse/tractusx/traceability/integration/common/config/RestitoConfig.java index eb9b41cb34..53a14d1c3d 100644 --- a/tx-backend/src/test/java/org/eclipse/tractusx/traceability/integration/common/config/RestitoConfig.java +++ b/tx-backend/src/test/java/org/eclipse/tractusx/traceability/integration/common/config/RestitoConfig.java @@ -49,6 +49,7 @@ public static class Initializer implements ApplicationContextInitializer additionalProperties = new HashMap<>(); + additionalProperties.put("additionalProperty1", "value1"); + EndpointDataReference endpointDataReference = EndpointDataReference.Builder + .newInstance() + .id("id") + .endpoint("http://localhost:" + RestitoConfig.getStubServer().getPort() + "/endpointdatareference") + .authKey("X-Api-Key") + .contractId("contractId") + .authCode("integration-tests") + .properties(additionalProperties) + .build(); + + endpointDataReferenceStorage.put("NmYxMjk2ZmUtYmRlZS00ZTViLTk0NzktOWU0YmQyYWYyNGQ3:ZDBjZGUzYjktOWEwMS00N2QzLTgwNTgtOTU2MjgyOGY2ZDBm:YjYxMjcxM2MtNjdkNC00N2JlLWI0NjMtNDdjNjk4YTk1Mjky", endpointDataReference); + } public void edcWillCreateNotificationAsset() { whenHttp(restitoProvider.stubServer()).match( post("/management/v2/assets"), @@ -83,6 +119,16 @@ public void edcWillRemoveNotificationAsset() { ); } + public void edcWillReturnCatalog() { + whenHttp(restitoProvider.stubServer()).match( + post("/management/v2/catalog/request"), + EDC_API_KEY_HEADER + ).then( + status(HttpStatus.OK_200), + restitoProvider.jsonResponseFromFile("stubs/edc/post/data/contractagreements/catalog_response_200.json") + ); + } + public void edcWillReturnContractAgreements() { whenHttp(restitoProvider.stubServer()).match( post("/management/v2/contractagreements/request"), @@ -200,6 +246,75 @@ public void edcWillFailToCreateContractDefinition() { ); } + public void edcWillCreateContractNegotiation() { + whenHttp(restitoProvider.stubServer()).match( + post("/management/v2/contractnegotiations"), + EDC_API_KEY_HEADER + ).then( + status(HttpStatus.OK_200), + restitoProvider.jsonResponseFromFile("stubs/edc/post/data/contractagreements/contractnegotiation_response_200.json") + ); + } + + public void edcWillReturnContractNegotiationOnlyState() { + whenHttp(restitoProvider.stubServer()).match( + matchesUri(Pattern.compile("/management/v2/contractnegotiations/" + uuidRegex + "/state")), + EDC_API_KEY_HEADER + ).then( + status(HttpStatus.OK_200), + restitoProvider.jsonResponseFromFile("stubs/edc/post/data/contractagreements/contractnegotiationonlystate_response_200.json") + ); + } + + public void edcWillReturnContractNegotiationState() { + whenHttp(restitoProvider.stubServer()).match( + matchesUri(Pattern.compile("/management/v2/contractnegotiations/" + uuidRegex)), + EDC_API_KEY_HEADER + ).then( + status(HttpStatus.OK_200), + restitoProvider.jsonResponseFromFile("stubs/edc/post/data/contractagreements/contractnegotiationstate_response_200.json") + ); + } + + public void edcWillCreateTransferprocesses() { + whenHttp(restitoProvider.stubServer()).match( + post("/management/v2/transferprocesses"), + EDC_API_KEY_HEADER + ).then( + status(HttpStatus.OK_200), + restitoProvider.jsonResponseFromFile("stubs/edc/post/data/contractagreements/transferprocesses_response_200.json") + ); + } + + public void edcWillReturnTransferprocessesOnlyState() { + whenHttp(restitoProvider.stubServer()).match( + matchesUri(Pattern.compile("/management/v2/transferprocesses/" + uuidRegex + "/state")), + EDC_API_KEY_HEADER + ).then( + status(HttpStatus.OK_200), + restitoProvider.jsonResponseFromFile("stubs/edc/post/data/contractagreements/transferprocessesonlystate_response_200.json") + ); + } + + public void edcWillReturnTransferprocessesState() { + whenHttp(restitoProvider.stubServer()).match( + matchesUri(Pattern.compile("/management/v2/transferprocesses/" + uuidRegex)), + EDC_API_KEY_HEADER + + ).then( + status(HttpStatus.OK_200), + restitoProvider.jsonResponseFromFile("stubs/edc/post/data/contractagreements/transferprocessesstate_response_200.json") + ); + } + + public void edcWillSendRequest() { + whenHttp(restitoProvider.stubServer()).match( + post("/endpointdatareference"), + EDC_API_KEY_HEADER + ).then( + status(HttpStatus.OK_200) + ); + } public void verifyCreateNotificationAssetEndpointCalledTimes(int times) { verifyHttp(restitoProvider.stubServer()).times(times, post("/management/v2/assets") diff --git a/tx-backend/src/test/java/org/eclipse/tractusx/traceability/integration/common/support/RestitoProvider.java b/tx-backend/src/test/java/org/eclipse/tractusx/traceability/integration/common/support/RestitoProvider.java index 39b62bbef0..c675182e3a 100644 --- a/tx-backend/src/test/java/org/eclipse/tractusx/traceability/integration/common/support/RestitoProvider.java +++ b/tx-backend/src/test/java/org/eclipse/tractusx/traceability/integration/common/support/RestitoProvider.java @@ -23,7 +23,10 @@ import org.eclipse.tractusx.traceability.integration.common.config.RestitoConfig; import org.springframework.stereotype.Component; +import static com.xebialabs.restito.semantics.Action.composite; +import static com.xebialabs.restito.semantics.Action.contentType; import static com.xebialabs.restito.semantics.Action.resourceContent; +import static com.xebialabs.restito.semantics.Action.stringContent; @Component public class RestitoProvider { @@ -35,4 +38,10 @@ public StubServer stubServer() { public Action jsonResponseFromFile(String location) { return resourceContent(location); } + + public Action jsonResponseFromString(String mockResponse) { + return composite(contentType("application/json"), stringContent(mockResponse)); + } + + } diff --git a/tx-backend/src/test/java/org/eclipse/tractusx/traceability/integration/notification/alert/PublisherAlertsControllerIT.java b/tx-backend/src/test/java/org/eclipse/tractusx/traceability/integration/notification/alert/PublisherAlertsControllerIT.java index 73ebee8cb0..e8cfd52da9 100644 --- a/tx-backend/src/test/java/org/eclipse/tractusx/traceability/integration/notification/alert/PublisherAlertsControllerIT.java +++ b/tx-backend/src/test/java/org/eclipse/tractusx/traceability/integration/notification/alert/PublisherAlertsControllerIT.java @@ -19,8 +19,16 @@ package org.eclipse.tractusx.traceability.integration.notification.alert; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.ObjectMapper; import io.restassured.http.ContentType; import lombok.val; +import notification.request.CloseNotificationRequest; +import notification.request.NotificationSeverityRequest; +import notification.request.NotificationTypeRequest; +import notification.request.StartNotificationRequest; +import notification.request.UpdateNotificationStatusRequest; +import notification.request.UpdateNotificationStatusTransitionRequest; import org.apache.commons.lang3.RandomStringUtils; import org.eclipse.tractusx.traceability.assets.domain.asbuilt.repository.AssetAsBuiltRepository; import org.eclipse.tractusx.traceability.assets.domain.asplanned.repository.AssetAsPlannedRepository; @@ -33,7 +41,11 @@ import org.eclipse.tractusx.traceability.integration.common.support.AlertNotificationsSupport; import org.eclipse.tractusx.traceability.integration.common.support.AlertsSupport; import org.eclipse.tractusx.traceability.integration.common.support.AssetsSupport; +import org.eclipse.tractusx.traceability.integration.common.support.DiscoveryFinderSupport; +import org.eclipse.tractusx.traceability.integration.common.support.EdcSupport; +import org.eclipse.tractusx.traceability.integration.common.support.IrsApiSupport; import org.eclipse.tractusx.traceability.integration.common.support.NotificationApiSupport; +import org.eclipse.tractusx.traceability.integration.common.support.OAuth2ApiSupport; import org.eclipse.tractusx.traceability.notification.domain.base.model.NotificationAffectedPart; import org.eclipse.tractusx.traceability.notification.domain.base.model.NotificationMessage; import org.eclipse.tractusx.traceability.notification.domain.base.model.NotificationSeverity; @@ -48,14 +60,6 @@ import org.junit.jupiter.api.Test; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.transaction.annotation.Transactional; -import org.testcontainers.shaded.com.fasterxml.jackson.core.JsonProcessingException; -import org.testcontainers.shaded.com.fasterxml.jackson.databind.ObjectMapper; -import notification.request.CloseNotificationRequest; -import notification.request.NotificationSeverityRequest; -import notification.request.NotificationTypeRequest; -import notification.request.StartNotificationRequest; -import notification.request.UpdateNotificationStatusTransitionRequest; -import notification.request.UpdateNotificationStatusRequest; import java.time.Instant; import java.util.Collections; @@ -83,6 +87,18 @@ class PublisherAlertsControllerIT extends IntegrationTestSpecification { @Autowired NotificationApiSupport notificationApiSupport; + @Autowired + EdcSupport edcSupport; + + @Autowired + DiscoveryFinderSupport discoveryFinderSupport; + + @Autowired + OAuth2ApiSupport oauth2ApiSupport; + + @Autowired + IrsApiSupport irsApiSupport; + @BeforeEach void setUp() { objectMapper = new ObjectMapper(); @@ -281,7 +297,7 @@ void givenWrongStatus_whenUpdateAlert_thenBadRequest() throws JsonProcessingExce } @Test - void shouldCancelAlert() throws JsonProcessingException, JoseException, com.fasterxml.jackson.core.JsonProcessingException { + void shouldCancelAlert() throws JoseException, JsonProcessingException { // given String filterString = "channel,EQUAL,SENDER,AND"; assetsSupport.defaultAssetsStored(); @@ -332,8 +348,13 @@ void shouldCancelAlert() throws JsonProcessingException, JoseException, com.fast } @Test - void shouldApproveAlertStatus() throws JsonProcessingException, JoseException, com.fasterxml.jackson.core.JsonProcessingException { + void shouldApproveAlertStatus() throws JoseException, JsonProcessingException { // given + irsApiSupport.irsApiReturnsPolicies(); + discoveryFinderSupport.discoveryFinderWillReturnEndpointAddress(); + discoveryFinderSupport.discoveryFinderWillReturnConnectorEndpoints(); + oauth2ApiSupport.oauth2ApiReturnsDtrToken(); + edcSupport.performSupportActionsForAsyncNotificationMessageExecutor(); String filterString = "channel,EQUAL,SENDER,AND"; List partIds = List.of( "urn:uuid:fe99da3d-b0de-4e80-81da-882aebcca978", // BPN: BPNL00000003AYRE @@ -382,8 +403,14 @@ void shouldApproveAlertStatus() throws JsonProcessingException, JoseException, c } @Test - void shouldCloseAlertStatus() throws JsonProcessingException, JoseException, com.fasterxml.jackson.core.JsonProcessingException { + void shouldCloseAlertStatus() throws JoseException, JsonProcessingException { // given + irsApiSupport.irsApiReturnsPolicies(); + discoveryFinderSupport.discoveryFinderWillReturnEndpointAddress(); + discoveryFinderSupport.discoveryFinderWillReturnConnectorEndpoints(); + oauth2ApiSupport.oauth2ApiReturnsDtrToken(); + edcSupport.performSupportActionsForAsyncNotificationMessageExecutor(); + String filterString = "channel,EQUAL,SENDER,AND"; List partIds = List.of( "urn:uuid:fe99da3d-b0de-4e80-81da-882aebcca978" // BPN: BPNL00000003AYRE @@ -487,7 +514,7 @@ void givenNoAuthorization_whenCancel_thenReturn401() { } @Test - void shouldBeCreatedBySender() throws JsonProcessingException, JoseException, com.fasterxml.jackson.core.JsonProcessingException { + void shouldBeCreatedBySender() throws JoseException, JsonProcessingException { // given String filterString = "channel,EQUAL,SENDER,AND"; List partIds = List.of( diff --git a/tx-backend/src/test/java/org/eclipse/tractusx/traceability/integration/notification/investigation/PublisherInvestigationsControllerIT.java b/tx-backend/src/test/java/org/eclipse/tractusx/traceability/integration/notification/investigation/PublisherInvestigationsControllerIT.java index 3632471db1..7dbad99cbb 100644 --- a/tx-backend/src/test/java/org/eclipse/tractusx/traceability/integration/notification/investigation/PublisherInvestigationsControllerIT.java +++ b/tx-backend/src/test/java/org/eclipse/tractusx/traceability/integration/notification/investigation/PublisherInvestigationsControllerIT.java @@ -19,6 +19,9 @@ package org.eclipse.tractusx.traceability.integration.notification.investigation; + +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.ObjectMapper; import io.restassured.http.ContentType; import lombok.val; import notification.request.CloseNotificationRequest; @@ -36,9 +39,13 @@ import org.eclipse.tractusx.traceability.common.security.JwtRole; import org.eclipse.tractusx.traceability.integration.IntegrationTestSpecification; import org.eclipse.tractusx.traceability.integration.common.support.AssetsSupport; +import org.eclipse.tractusx.traceability.integration.common.support.DiscoveryFinderSupport; +import org.eclipse.tractusx.traceability.integration.common.support.EdcSupport; +import org.eclipse.tractusx.traceability.integration.common.support.IrsApiSupport; import org.eclipse.tractusx.traceability.integration.common.support.NotificationApiSupport; import org.eclipse.tractusx.traceability.integration.common.support.NotificationMessageSupport; import org.eclipse.tractusx.traceability.integration.common.support.NotificationSupport; +import org.eclipse.tractusx.traceability.integration.common.support.OAuth2ApiSupport; import org.eclipse.tractusx.traceability.notification.domain.base.model.NotificationAffectedPart; import org.eclipse.tractusx.traceability.notification.domain.base.model.NotificationMessage; import org.eclipse.tractusx.traceability.notification.domain.base.model.NotificationSeverity; @@ -53,8 +60,6 @@ import org.junit.jupiter.api.Test; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.transaction.annotation.Transactional; -import org.testcontainers.shaded.com.fasterxml.jackson.core.JsonProcessingException; -import org.testcontainers.shaded.com.fasterxml.jackson.databind.ObjectMapper; import java.time.Instant; import java.util.Collections; @@ -79,6 +84,17 @@ class PublisherInvestigationsControllerIT extends IntegrationTestSpecification { AssetAsBuiltRepository assetAsBuiltRepository; @Autowired NotificationApiSupport notificationApiSupport; + @Autowired + EdcSupport edcSupport; + + @Autowired + DiscoveryFinderSupport discoveryFinderSupport; + + @Autowired + OAuth2ApiSupport oauth2ApiSupport; + + @Autowired + IrsApiSupport irsApiSupport; ObjectMapper objectMapper; @@ -120,7 +136,7 @@ void shouldReceiveNotification() { } @Test - void shouldStartInvestigation() throws JoseException, com.fasterxml.jackson.core.JsonProcessingException { + void shouldStartInvestigation() throws JoseException, JsonProcessingException { // given @@ -162,7 +178,7 @@ void shouldStartInvestigation() throws JoseException, com.fasterxml.jackson.core } @Test - void givenMissingPartIds_whenStartInvestigation_thenBadRequest() throws JoseException, com.fasterxml.jackson.core.JsonProcessingException { + void givenMissingPartIds_whenStartInvestigation_thenBadRequest() throws JoseException, JsonProcessingException { // given @@ -183,7 +199,7 @@ void givenMissingPartIds_whenStartInvestigation_thenBadRequest() throws JoseExce } @Test - void givenMissingBPN_whenStartInvestigation_thenBadRequest() throws JoseException, com.fasterxml.jackson.core.JsonProcessingException { + void givenMissingBPN_whenStartInvestigation_thenBadRequest() throws JoseException, JsonProcessingException { // given @@ -210,7 +226,7 @@ void givenMissingBPN_whenStartInvestigation_thenBadRequest() throws JoseExceptio } @Test - void givenMissingSeverity_whenStartInvestigation_thenBadRequest() throws JsonProcessingException, JoseException { + void givenMissingSeverity_whenStartInvestigation_thenBadRequest() throws JoseException, JsonProcessingException { // given List partIds = List.of( "urn:uuid:fe99da3d-b0de-4e80-81da-882aebcca978", // BPN: BPNL00000003AYRE @@ -235,7 +251,7 @@ void givenMissingSeverity_whenStartInvestigation_thenBadRequest() throws JsonPro } @Test - void givenDescriptionExceedsMaxLength_whenStartInvestigation_thenBadRequest() throws JsonProcessingException, JoseException { + void givenDescriptionExceedsMaxLength_whenStartInvestigation_thenBadRequest() throws JoseException, JsonProcessingException { // given List partIds = List.of( "urn:uuid:fe99da3d-b0de-4e80-81da-882aebcca978", // BPN: BPNL00000003AYRE @@ -313,7 +329,7 @@ void givenWrongStatus_whenUpdateInvestigation_thenBadRequest() throws JsonProces } @Test - void shouldCancelInvestigation() throws JsonProcessingException, JoseException, com.fasterxml.jackson.core.JsonProcessingException { + void shouldCancelInvestigation() throws JoseException, JsonProcessingException { // given assetsSupport.defaultAssetsStored(); val startInvestigationRequest = StartNotificationRequest.builder() @@ -360,8 +376,13 @@ void shouldCancelInvestigation() throws JsonProcessingException, JoseException, } @Test - void shouldApproveInvestigationStatus() throws JsonProcessingException, JoseException, com.fasterxml.jackson.core.JsonProcessingException { + void shouldApproveInvestigationStatus() throws JoseException, JsonProcessingException { // given + irsApiSupport.irsApiReturnsPolicies(); + discoveryFinderSupport.discoveryFinderWillReturnEndpointAddress(); + discoveryFinderSupport.discoveryFinderWillReturnConnectorEndpoints(); + oauth2ApiSupport.oauth2ApiReturnsDtrToken(); + edcSupport.performSupportActionsForAsyncNotificationMessageExecutor(); List partIds = List.of( "urn:uuid:fe99da3d-b0de-4e80-81da-882aebcca978", // BPN: BPNL00000003AYRE "urn:uuid:0ce83951-bc18-4e8f-892d-48bad4eb67ef" // BPN: BPNL00000003AXS3 @@ -410,8 +431,14 @@ void shouldApproveInvestigationStatus() throws JsonProcessingException, JoseExce } @Test - void shouldCloseInvestigationStatus() throws JsonProcessingException, JoseException, com.fasterxml.jackson.core.JsonProcessingException { + void shouldCloseInvestigationStatus() throws JoseException, JsonProcessingException { // given + irsApiSupport.irsApiReturnsPolicies(); + discoveryFinderSupport.discoveryFinderWillReturnEndpointAddress(); + discoveryFinderSupport.discoveryFinderWillReturnConnectorEndpoints(); + oauth2ApiSupport.oauth2ApiReturnsDtrToken(); + edcSupport.performSupportActionsForAsyncNotificationMessageExecutor(); + List partIds = List.of( "urn:uuid:fe99da3d-b0de-4e80-81da-882aebcca978" // BPN: BPNL00000003AYRE ); @@ -512,7 +539,7 @@ void givenNoAuthorization_whenCancel_thenReturn401() { } @Test - void shouldBeCreatedBySender() throws JsonProcessingException, JoseException, com.fasterxml.jackson.core.JsonProcessingException { + void shouldBeCreatedBySender() throws JoseException, JsonProcessingException { // given List partIds = List.of( "urn:uuid:fe99da3d-b0de-4e80-81da-882aebcca978", // BPN: BPNL00000003AYRE diff --git a/tx-backend/src/test/resources/stubs/discovery.post.data/discovery_finder_connector_response_200.json b/tx-backend/src/test/resources/stubs/discovery.post.data/discovery_finder_connector_response_200.json new file mode 100644 index 0000000000..da81038222 --- /dev/null +++ b/tx-backend/src/test/resources/stubs/discovery.post.data/discovery_finder_connector_response_200.json @@ -0,0 +1,8 @@ +[ + { + "bpn" : "BPNL00000003CNKC", + "connectorEndpoint" : [ + "${Placeholder}" + ] + } +] diff --git a/tx-backend/src/test/resources/stubs/discovery.post.data/discovery_finder_response_200.json b/tx-backend/src/test/resources/stubs/discovery.post.data/discovery_finder_response_200.json new file mode 100644 index 0000000000..39ae667f44 --- /dev/null +++ b/tx-backend/src/test/resources/stubs/discovery.post.data/discovery_finder_response_200.json @@ -0,0 +1,11 @@ +{ + "endpoints" : [ + { + "type" : "bpn", + "description" : "Service to discover EDC to a particular BPN", + "endpointAddress" : "${Placeholder}", + "documentation" : "http://.../swagger/index.html", + "resourceId" : "316417cd-0fb5-4daf-8dfa-8f68125923f1" + } + ] +} diff --git a/tx-backend/src/test/resources/stubs/edc/post/data/contractagreements/catalog_response_200.json b/tx-backend/src/test/resources/stubs/edc/post/data/contractagreements/catalog_response_200.json new file mode 100644 index 0000000000..9bed5152cb --- /dev/null +++ b/tx-backend/src/test/resources/stubs/edc/post/data/contractagreements/catalog_response_200.json @@ -0,0 +1,101 @@ +{ + "@id": "f0e0805b-df8d-495f-94ba-e442dcadb220", + "@type": "dcat:Catalog", + "dspace:participantId": "BPNL00000003CNKC", + "dcat:dataset": { + "@id": "40276218-e31b-4c35-a7c8-017e8edb702e", + "@type": "dcat:Dataset", + "odrl:hasPolicy": { + "@id": "ZGM3MTBlMjktNmExZC00YWQ2LWJmMTQtNWYyMjdjMDAwN2Zi:NDAyNzYyMTgtZTMxYi00YzM1LWE3YzgtMDE3ZThlZGI3MDJl:MWFlN2Q0NTYtYWZhYi00MmVlLWFjZmYtZTUyZWJkMmQwY2Vk", + "@type": "odrl:Offer", + "odrl:permission": { + "odrl:action": { + "odrl:type": "USE" + }, + "odrl:constraint": { + "odrl:and": [ + { + "odrl:leftOperand": "cx-policy:FrameworkAgreement", + "odrl:operator": { + "@id": "odrl:eq" + }, + "odrl:rightOperand": "traceability:1.0" + }, + { + "odrl:leftOperand": "cx-policy:UsagePurpose", + "odrl:operator": { + "@id": "odrl:eq" + }, + "odrl:rightOperand": "cx.core.industrycore:1" + } + ] + } + }, + "odrl:prohibition": [], + "odrl:obligation": [] + }, + "dcat:distribution": [ + { + "@type": "dcat:Distribution", + "dct:format": { + "@id": "AzureStorage-PUSH" + }, + "dcat:accessService": { + "@id": "2658a111-28b5-4623-8fbe-6320215a4c21", + "@type": "dcat:DataService", + "dct:terms": "connector", + "dct:endpointUrl": "https://test.de/api/v1/dsp" + } + }, + { + "@type": "dcat:Distribution", + "dct:format": { + "@id": "HttpData-PULL" + }, + "dcat:accessService": { + "@id": "2658a111-28b5-4623-8fbe-6320215a4c21", + "@type": "dcat:DataService", + "dct:terms": "connector", + "dct:endpointUrl": "https://test.de/api/v1/dsp" + } + }, + { + "@type": "dcat:Distribution", + "dct:format": { + "@id": "AmazonS3-PUSH" + }, + "dcat:accessService": { + "@id": "2658a111-28b5-4623-8fbe-6320215a4c21", + "@type": "dcat:DataService", + "dct:terms": "connector", + "dct:endpointUrl": "https://test.de/api/v1/dsp" + } + } + ], + "type": "qualityalert", + "notificationtype": "qualityalert", + "policy-id": "use-eu", + "description": "QUALITY_ALERT RECEIVE", + "id": "40276218-e31b-4c35-a7c8-017e8edb702e", + "contenttype": "application/json", + "notificationmethod": "receive" + }, + "dcat:service": { + "@id": "2658a111-28b5-4623-8fbe-6320215a4c21", + "@type": "dcat:DataService", + "dct:terms": "connector", + "dct:endpointUrl": "https://test.de/api/v1/dsp" + }, + "participantId": "BPNL00000003CNKC", + "@context": { + "@vocab": "https://w3id.org/edc/v0.0.1/ns/", + "edc": "https://w3id.org/edc/v0.0.1/ns/", + "tx": "https://w3id.org/tractusx/v0.0.1/ns/", + "tx-auth": "https://w3id.org/tractusx/auth/", + "cx-policy": "https://w3id.org/catenax/policy/", + "dcat": "http://www.w3.org/ns/dcat#", + "dct": "http://purl.org/dc/terms/", + "odrl": "http://www.w3.org/ns/odrl/2/", + "dspace": "https://w3id.org/dspace/v0.8/" + } +} diff --git a/tx-backend/src/test/resources/stubs/edc/post/data/contractagreements/contractagreement_negotiation_response_200.json b/tx-backend/src/test/resources/stubs/edc/post/data/contractagreements/contractagreement_negotiation_response_200.json index 8aa4ac952a..3b9b0e7716 100644 --- a/tx-backend/src/test/resources/stubs/edc/post/data/contractagreements/contractagreement_negotiation_response_200.json +++ b/tx-backend/src/test/resources/stubs/edc/post/data/contractagreements/contractagreement_negotiation_response_200.json @@ -1,14 +1,14 @@ { "@type" : "edc:ContractNegotiation", "@id" : "a521a424-a07b-4a08-a845-676f2ddd0e89", - "type" : "CONSUMER", - "protocol" : "dataspace-protocol-http", - "state" : "FINALIZED", - "counterPartyId" : "BPNL00000003CML1", - "counterPartyAddress" : "https://trace-x-edc-e2e-a.dev.demo.catena-x.net/api/v1/dsp", - "callbackAddresses" : [], - "createdAt" : 1708590580001, - "contractAgreementId" : "ODA3MmUyNTQtOGNlZi00YzQ2LTljNGYtNGYzNjE2YjQ5NTZl:cmVnaXN0cnktYXNzZXQ=:MDljNDMzY2EtODI5OS00OGE3LWI0MjYtNzZmZjJmODE1ZWE2", + "type": "CONSUMER", + "protocol": "dataspace-protocol-http", + "state": "FINALIZED", + "counterPartyId": "BPNL00000003CML1", + "counterPartyAddress": "https://trace-x-edc-e2e-a.dev.demo.catena-x.net/api/v1/dsp", + "callbackAddresses": [], + "createdAt": 1708590580001, + "contractAgreementId": "ODA3MmUyNTQtOGNlZi00YzQ2LTljNGYtNGYzNjE2YjQ5NTZl:cmVnaXN0cnktYXNzZXQ=:MDljNDMzY2EtODI5OS00OGE3LWI0MjYtNzZmZjJmODE1ZWE2", "@context" : { "dct" : "https://purl.org/dc/terms/", "tx" : "https://w3id.org/tractusx/v0.0.1/ns/", diff --git a/tx-backend/src/test/resources/stubs/edc/post/data/contractagreements/contractnegotiation_response_200.json b/tx-backend/src/test/resources/stubs/edc/post/data/contractagreements/contractnegotiation_response_200.json new file mode 100644 index 0000000000..939dea3069 --- /dev/null +++ b/tx-backend/src/test/resources/stubs/edc/post/data/contractagreements/contractnegotiation_response_200.json @@ -0,0 +1,13 @@ +{ + "@type": "IdResponse", + "@id": "8afcbabd-71c2-44a6-ba52-72465517f376", + "createdAt": 1716296200620, + "@context": { + "@vocab": "https://w3id.org/edc/v0.0.1/ns/", + "edc": "https://w3id.org/edc/v0.0.1/ns/", + "tx": "https://w3id.org/tractusx/v0.0.1/ns/", + "tx-auth": "https://w3id.org/tractusx/auth/", + "cx-policy": "https://w3id.org/catenax/policy/", + "odrl": "http://www.w3.org/ns/odrl/2/" + } +} diff --git a/tx-backend/src/test/resources/stubs/edc/post/data/contractagreements/contractnegotiationonlystate_response_200.json b/tx-backend/src/test/resources/stubs/edc/post/data/contractagreements/contractnegotiationonlystate_response_200.json new file mode 100644 index 0000000000..2fd81b01c9 --- /dev/null +++ b/tx-backend/src/test/resources/stubs/edc/post/data/contractagreements/contractnegotiationonlystate_response_200.json @@ -0,0 +1,12 @@ +{ + "@type": "NegotiationState", + "state": "FINALIZED", + "@context": { + "@vocab": "https://w3id.org/edc/v0.0.1/ns/", + "edc": "https://w3id.org/edc/v0.0.1/ns/", + "tx": "https://w3id.org/tractusx/v0.0.1/ns/", + "tx-auth": "https://w3id.org/tractusx/auth/", + "cx-policy": "https://w3id.org/catenax/policy/", + "odrl": "http://www.w3.org/ns/odrl/2/" + } +} diff --git a/tx-backend/src/test/resources/stubs/edc/post/data/contractagreements/contractnegotiationstate_response_200.json b/tx-backend/src/test/resources/stubs/edc/post/data/contractagreements/contractnegotiationstate_response_200.json new file mode 100644 index 0000000000..97f62ab3aa --- /dev/null +++ b/tx-backend/src/test/resources/stubs/edc/post/data/contractagreements/contractnegotiationstate_response_200.json @@ -0,0 +1,20 @@ +{ + "@type": "ContractNegotiation", + "@id": "8afcbabd-71c2-44a6-ba52-72465517f376", + "type": "CONSUMER", + "protocol": "dataspace-protocol-http", + "state": "FINALIZED", + "counterPartyId": "BPNL00000003CNKC", + "counterPartyAddress": "https://test.net/api/v1/dsp", + "callbackAddresses": [], + "createdAt": 1716296200620, + "contractAgreementId": "NmYxMjk2ZmUtYmRlZS00ZTViLTk0NzktOWU0YmQyYWYyNGQ3:ZDBjZGUzYjktOWEwMS00N2QzLTgwNTgtOTU2MjgyOGY2ZDBm:YjYxMjcxM2MtNjdkNC00N2JlLWI0NjMtNDdjNjk4YTk1Mjky", + "@context": { + "@vocab": "https://w3id.org/edc/v0.0.1/ns/", + "edc": "https://w3id.org/edc/v0.0.1/ns/", + "tx": "https://w3id.org/tractusx/v0.0.1/ns/", + "tx-auth": "https://w3id.org/tractusx/auth/", + "cx-policy": "https://w3id.org/catenax/policy/", + "odrl": "http://www.w3.org/ns/odrl/2/" + } +} diff --git a/tx-backend/src/test/resources/stubs/edc/post/data/contractagreements/transferprocesses_response_200.json b/tx-backend/src/test/resources/stubs/edc/post/data/contractagreements/transferprocesses_response_200.json new file mode 100644 index 0000000000..5261c1fe85 --- /dev/null +++ b/tx-backend/src/test/resources/stubs/edc/post/data/contractagreements/transferprocesses_response_200.json @@ -0,0 +1,13 @@ +{ + "@type": "IdResponse", + "@id": "ea7e9226-e2b6-4fd0-a34e-4a9121c6e30f", + "createdAt": 1716299185639, + "@context": { + "@vocab": "https://w3id.org/edc/v0.0.1/ns/", + "edc": "https://w3id.org/edc/v0.0.1/ns/", + "tx": "https://w3id.org/tractusx/v0.0.1/ns/", + "tx-auth": "https://w3id.org/tractusx/auth/", + "cx-policy": "https://w3id.org/catenax/policy/", + "odrl": "http://www.w3.org/ns/odrl/2/" + } +} diff --git a/tx-backend/src/test/resources/stubs/edc/post/data/contractagreements/transferprocessesonlystate_response_200.json b/tx-backend/src/test/resources/stubs/edc/post/data/contractagreements/transferprocessesonlystate_response_200.json new file mode 100644 index 0000000000..4a79310c14 --- /dev/null +++ b/tx-backend/src/test/resources/stubs/edc/post/data/contractagreements/transferprocessesonlystate_response_200.json @@ -0,0 +1,12 @@ +{ + "@type": "TransferState", + "state": "STARTED", + "@context": { + "@vocab": "https://w3id.org/edc/v0.0.1/ns/", + "edc": "https://w3id.org/edc/v0.0.1/ns/", + "tx": "https://w3id.org/tractusx/v0.0.1/ns/", + "tx-auth": "https://w3id.org/tractusx/auth/", + "cx-policy": "https://w3id.org/catenax/policy/", + "odrl": "http://www.w3.org/ns/odrl/2/" + } +} diff --git a/tx-backend/src/test/resources/stubs/edc/post/data/contractagreements/transferprocessesstate_response_200.json b/tx-backend/src/test/resources/stubs/edc/post/data/contractagreements/transferprocessesstate_response_200.json new file mode 100644 index 0000000000..6deb68460e --- /dev/null +++ b/tx-backend/src/test/resources/stubs/edc/post/data/contractagreements/transferprocessesstate_response_200.json @@ -0,0 +1,29 @@ +{ + "@id": "ea7e9226-e2b6-4fd0-a34e-4a9121c6e30f", + "@type": "TransferProcess", + "state": "STARTED", + "stateTimestamp": 1716299186396, + "type": "CONSUMER", + "callbackAddresses": { + "@type": "CallbackAddress", + "transactional": false, + "uri": "${EDC_CALLBACK_URL_EDC_CLIENT}", + "events": "transfer.process.started" + }, + "assetId": "40276218-e31b-4c35-a7c8-017e8edb702e", + "contractId": "NmYxMjk2ZmUtYmRlZS00ZTViLTk0NzktOWU0YmQyYWYyNGQ3:ZDBjZGUzYjktOWEwMS00N2QzLTgwNTgtOTU2MjgyOGY2ZDBm:YjYxMjcxM2MtNjdkNC00N2JlLWI0NjMtNDdjNjk4YTk1Mjky", + "transferType": "HttpData-PULL", + "errorDetail": "Policy not found for contract: NmYxMjk2ZmUtYmRlZS00ZTViLTk0NzktOWU0YmQyYWYyNGQ3:ZDBjZGUzYjktOWEwMS00N2QzLTgwNTgtOTU2MjgyOGY2ZDBm:YjYxMjcxM2MtNjdkNC00N2JlLWI0NjMtNDdjNjk4YTk1Mjky", + "dataDestination": { + "@type": "DataAddress", + "type": "HttpProxy" + }, + "@context": { + "@vocab": "https://w3id.org/edc/v0.0.1/ns/", + "edc": "https://w3id.org/edc/v0.0.1/ns/", + "tx": "https://w3id.org/tractusx/v0.0.1/ns/", + "tx-auth": "https://w3id.org/tractusx/auth/", + "cx-policy": "https://w3id.org/catenax/policy/", + "odrl": "http://www.w3.org/ns/odrl/2/" + } +}