Manual Integration Test: Additional Targets in OData Error Response
DESCRIPTION
With OData V4 error responses, multiple targets are addressed with an OData instance
annotation "@com.sap.vocabularies.Common.v1.additionalTargets" in order to highlight
different UI elements by a single error message.
PREPARATION
To check console errors open the developer tools before starting the application and check
with each step, that there are no errors and warnings.
Testing with mock data
Start the Sales Orders application with following URL (adjust host and port if necessary):
Testing with back end
Configure your IDE to be able to execute the Sales Orders application against an ABAP
back end system.
Start the Sales Orders application with the URL (adjust host and port if necessary):
REALIZE and CHECK
Preparation: create a new sales order
- After the application is started, click on
Create
in the Sales
Orders
table.
- Modify the content of the
Note
input field of the
Create New Sales Order
dialog.
- Click on
OK
in the Create New Sales Order
dialog.
- Click on
Save
in the New Sales Orders
table.
- Click on
OK
in the Success
dialog.
- Select the newly created sales order.
Create a new sales order item which is rejected by the back end with an error having
multiple targets
- Click on
Create
in the Sales Order Line Items
table.
- Change the
Product ID
of the newly created sales order line item by
entering "HT-1003"
as Product ID
.
- Click on
Save
in the Sales Order Details
section.
- Check: The message popover is opened and you get an error regarding the
invalid
Quantity
for ProductID "HT-1003"
.
- Check: The
Quantity
field of the new sales order line item
has a colored border indicating an error.
- Check: When clicking into the
Quantity
the same error is
highlighted below/beside the input field.
- Check: The
ProductID
field of the new sales order line item
has a colored border indicating an error.
- Check: When clicking into the
ProductID
the same error is
highlighted below/beside the input field.
- Change the
Quantity
of the newly created sales order line item to
"3.0"
- Click on
Save
in the Sales Order Details
section.
- Check: The error is no longer raised and the input fields for
ProductID
and Quantity
have no error state any more.