Manual Integration Test: Message Handling in Sales Orders Application (V2)
DESCRIPTION
Test message handling in the OData V2 Model with the Sales Orders application.
PREPARATION
To check console errors open the developer tools before starting the application and check
for each step that there are no errors and warnings.
Testing with back end
Configure your IDE to be able to execute the Sales Orders application against an ABAP
back-end system.
Depending on your installation, you might have to replace Port 8080 in all following links
with the port of your local server hosting the Sales Orders application.
It might be necessary to add a URL segment /testsuite
directly after the port
to the following URLs depending on your development setup.
Start the Sales Orders V2 application with the English locale:
Testing with mock data
Configure your IDE to be able to execute the Sales Orders application locally or use a
centrally deployed version of the Sales Orders application as provided by the test
coordinator.
Depending on your installation, you might have to replace Port 8080 in all following links
with the port of your local server hosting the Sales Orders application.
It might be necessary to add a URL segment /testsuite
directly after the port
to the following URLs depending on your development setup.
Start the Sales Orders V2 application with the English locale:
The service implementation does some checks which produce messages.
Checks for a Sales Order
- If the note of the sales order is empty the service returns a
warning message for that sales order note to enter a note.
- If the note of the sales order has a prefix "Error:", "Warning:",
"Info:" or "Success:" then the service returns a message for that note with the
corresponding message severity and the message text as given in the note after the
":".
Checks for a Sales Order Item
- If the note of the sales order item is empty the service returns a
warning message for that sales order item note to enter a note.
- If the note of the sales order item has a prefix "Error:",
"Warning:", "Info:" or "Success:" then the service returns a message for that sales
order item note with the corresponding message severity and the message text as
given in the note after the ":".
- If the quantity of the sales order item is 0 then
the service returns an error message for that quantity indicating that the quantity
must not be 0.
- If the quantity of the sales order item is 1 for
the product HT-1000 then the service returns a
warning message for that quantity indicating that the quantity must be at least 2.
- If the quantity of the sales order item is greater than
1 for the product HT-1022 then
the service returns a multi target warning message which points simultaneously to
the quantity and the note field until the note has a "Reason:" prefix.
- If the product of the sales order item is HT-1110
then the service returns a warning message for the product ID of the associated
product (using the target
ToProduct/ProductID
) indicating that the
product is out of maintenance.
- If the product of the sales order item is HT-1501,
the service returns an information message for the currency of that sales order item
indicating that the currency 'JPY' should be avoided.
Finding a Sales Order
To find a sales order that can be used for testing, you can either use the OData V4 Sales
Orders application or you can trigger a service request.
Via OData V4 Application
Start the OData V4 Sales Orders application:
In that application you can search for a sales order or you can create your own one that is
matching the requirements for the test.
Via OData Service Calls
Execute for example following URL:
You get a JSON for the first 20 sales orders.
Copy the resulting JSON and paste it into the console of the Chrome Developer Tools and
press enter. You can drill down into the data to find a Sales Order that is matching the
requirements for the test.
If there is no matching sales order you can add &$skip=
followed
by a start index, e.g. &$skip=40
, to the URL to get another set of sales
orders.
REALIZE and CHECK
(I) Messages for Note Fields
Search for a sales order with at least 1 item and note down the sales order ID. In case of
mock data: Use sales order 101
.
- Enter that sales order ID into the
Sales Order
input field and press
Enter
or click the Show Sales Order
button.
Check: The sales order and the sales order items are loaded and displayed in
the Sales Order Details
section.
- Remember the number of messages displayed on the
Show Messages
button
in the footer of the application.
- Repeat the next steps with following values for the note:
Error: My error message
Warning: My warning message
Info: My information message
Success: My success message
- Go to a sales order item without messages and change the
Note
to the value above and press the Save
button in the footer.
Check: The number of messages has been increased by 1.
Check: The border of the sales order item's note field has a border
indicating the corresponding severity of the message.
Check: When clicking into the sales order item's note field, the
message text (i.e. the text as entered after the ":") is shown.
Check: The table row is highlighted with the same color as the border
of the sales order item's note input field.
- Click the
Show Messages
button.
Check: A popover is displayed with the current messages.
Check: The message popover contains an entry with the message text as
described above.
- Click into the modified sales order item's note input field, change the text
to
No message
and press the Save
button.
Check: The number of messages has been decreased by 1.
Check: The message has been removed from the message popover.
(II) Message Strip and Aggregated Table Row Highlighting
Search for a sales order with at least 2 items and with at least one item for the product
HT-1000
and note down the sales order ID. An item for the product
HT-1110
should not be contained. In case of mock data: Use sales order
102
.
- Enter that sales order ID into the
Sales Order
input field and press
Enter
or click the Show Sales Order
button.
Check: The sales order and the sales order items are loaded and displayed in
the Sales Order Details
section.
- Change the note value of the items in a way that the service returns a message for
that note (see (I) Messages for Note Fields)
and save the changes.
Check: If there is at least one message for an item, a message strip is
displayed above the table indicating that there are messages for items.
Check: Depending on the severity of the messages (Error
,
Warning
, Success
or Information
) the
message strip of the table changes its text, icon and color.
- If there is more than one message for a sales order item the highest severity is
used for the row highlighting. Change the quantity of a sales order item with the
product
HT-1000
to the value 1
and save it.
Check: There is a message for the quantity of the item that at least 2 have
to be ordered.
Check: If the corresponding note field does not start with
Error:
the row highlighter indicates a warning.
- Change the note of that sales order item to
Error: My error message
and save.
Check: There is an error message for the note field and the row highlighter
indicates an error.
Search for a sales order with an item for the product HT-1110
and note down
the sales order ID. In case of mock data: Use sales order 102.2
.
- Enter that sales order ID into the
Sales Order
input field and press
Enter
or click the Show Sales Order
button.
Check: The sales order and the sales order items are loaded and displayed in
the Sales Order Details
section.
- If the item shows an error for the note, remove the prefix
Error:
,
Warning:
, Info:
or Success:
and save.
Check: The table row is still marked with a warning because the associated
product is out of maintenance.
(III) Message Lifecycle - Side-Effects
Search for a sales order with more than 4 items and with three items for the product
HT-1000
with a quantity less than 2. Two of these items are in the visible area
an the third is at the 5th (or later) position in the sales order. Note down the sales order
ID. In case of mock data: Use sales order 103
.
- Enter that sales order ID into the
Sales Order
input field and press
Enter
or click the Show Sales Order
button.
Check: The sales order and the sales order items are loaded and displayed in
the Sales Order Details
section.
Check: For all three items for product HT-1000
with a quantity
less than 2, there are warnings that at least 2 EA
of that product
has to be ordered.
Check: The visible table rows with product HT-1000
are marked
with a warning because the quantity is less than 2.
Check: Remember the number of messages.
- Press the
Fix Quantities
button.
Check: The number of messages has not changed.
Check: The Quantity
value of the table rows with product
HT-1000
has been changed to the value 2
.
Check: The visible table rows with product HT-1000
are marked
with a success because the quantity is updated to 2.
- Scroll to the end of the sales order line items table.
Check: All items for HT-1000
have at least a quantity of 2.
Check: The visible table rows with product HT-1000
are marked
with a success because the quantity is updated to 2.
- Open the message popover.
Check: The previous warning messages have disappeared.
Check: There are three messages that the quantity has been successfully
updated.
- Close the message popover.
Check: The number of messages has not been decreased.
(IV) Transition Messages Only
If a table is embedded into an object page, all messages for the table need to be displayed.
If the application starts with a table, only the messages for the table rows which are on
the client have to be displayed. The framework is not able to detect these scenarios
automatically, so the application has to set the transitionMessagesOnly
parameter at the list binding:
transitionMessagesOnly=true
:
The root entity of the object page handles messages and the list binding for the
table does not take care of messages. This scenario has been tested above.
transitionMessagesOnly=false
:
The binding for the table takes care of messages. This scenario is tested with this
test.
Search for a sales order with at least 5 items and note down the sales order ID. In case of
mock data: Use sales order 104
.
- Enter that sales order ID into the
Sales Order
input field and press
Enter
or click the Show Sales Order
button.
Check: The sales order and the sales order items are loaded and displayed in
the Sales Order Details
section.
- Change the note value of the first item in a way that the service returns a message
for that note (see
(I) Messages for Note Fields) and save the
changes.
- Change the note value of the 5th item in a way that the service returns a message
for that note (see
(I) Messages for Note Fields) and save the
changes.
- Remember the number of messages for that sales order.
- Scroll to the top of the table and press the
Transition Messages Only
button to disable that feature.
Check: The sales order and the sales order items are reloaded and the number
of messages is less than before.
Check: The message for the 5th item is not contained in the message popover.
- Scroll in the table that the 5th item is requested.
Check: The number of messages increases.
Check: The message for the 5th item is contained in the message popover.
(V) Filter Sales Order Items by Items with Messages
Search for a sales order with items with and without messages. The messages should have a
different message severity. In case of mock data: Use sales order 105
.
- Enter that sales order ID into the
Sales Order
input field and press
Enter
or click the Show Sales Order
button.
Check: The sales order and the sales order items are loaded and displayed in
the Sales Order Details
section.
Check: There are items with and without messages.
- Change the
Filter
value in the Sales Order Items
table
from Show all
to any other value.
Check: Only items that match the selected filter are displayed.
Check: If there is no item matching the selected filter, you get a message
box with the information, that no item matches. The filter for the table has
been changed back to Show all
.
- Repeat the steps above with different filter values.
(VI) Create and Delete Sales Order Items
Search for a sales order with at most two items. In case of mock data: Use sales order
106
.
- Enter that sales order ID into the
Sales Order
input field and press
Enter
or click the Show Sales Order
button.
Check: The sales order and the sales order items are loaded and displayed in
the Sales Order Details
section.
Check: Remember the number of messages.
- In the
Sales Order Items
table click on the
Create a sales order item
button.
Check: A Create a New Sales Order Item
dialog opens.
- In the
Create a New Sales Order Item
dialog remove the value of the
Product ID
field and press the Save
button.
Check: A message box is displayed indicating that the mandatory field
'PRODUCT_GUID' is empty.
- Close the error message box.
Check: The Create a New Sales Order Item
dialog is still open.
- In the
Create a New Sales Order Item
dialog click the
Discard
button.
Check: The Create a New Sales Order Item
dialog is closed.
- Remember the
Gross Amount
and the Changed At
data from the
Sales Order
section.
- Repeat the steps (2) - (4).
- In the
Create a New Sales Order Item
dialog enter HT-1000
in the Product ID
field, remove the content of the Note
field and press the Save
button.
Check: A success message box is displayed with the information, that the item
has been created. Confirm that message box.
Check: The newly created item is displayed in the
Sales Order Items
table.
Check: The Gross Amount
and the Changed At
values
are updated.
Check: There are two new messages in the message popover, one for the
quantity which has to be at least 2 and one for the missing note of the new
sales order item.
- Only with back end: Open the developer tools,
navigate to the network tab, clear the requests and filter for
$batch
requests.
- In the
Sales Order Items
table click on the >
at the
end of the row for the newly created entity to open the product details.
Check: A Product Details
dialog is opened showing the
Product ID
and the corresponding product Name
.
Only with back end: Check: There is no
$batch
request.
- Close the
Product Details
dialog.
- In the
Sales Order Items
table select the newly created item and press
the Delete the selected sales order item
button.
Check: A Sales Order Item Deletion
dialog opens.
- In the
Sales Order Item Deletion
dialog click on the OK
button.
Check: The Sales Order Item Deletion
dialog is closed and a
message toast is displayed with the information, that the deletion was
successful.
Check: The deleted item has been removed from the
Sales Order Items
table.
Check: The Gross Amount
and the Changed At
values
are updated.
Check: The messages for the deleted item have been removed from the message
popover.
(VII) Unbound Messages
Search for a sales order with an ID less than 0500000010
. In case of mock data:
Use sales order 107
.
- Enter that sales order ID into the
Sales Order
input field and press
Enter
or click the Show Sales Order
button.
Check: A warning message box is displayed with the text System
maintenance starts in 2 hours
.
- Close the warning message box.
Check: The sales order and the sales order items are loaded and displayed in
the Sales Order Details
section.
- Open the message popover.
Check: There is a message System maintenance starts in 2 hours
.
- Navigate to the message details and click on
Technical Details
link
to open the Message Details
dialog.
Check: The values for Target
and Full Target
are
empty.
- Close the
Message Details
dialog and close the message popover.
Check: The number of messages has been decreased and the message is no longer
listed in the message popover.
(VIII) Messages with multiple Targets
Search for a sales order with an item for the product HT-1022
. In case of mock
data: Use sales order 108
.
- Enter that sales order ID into the
Sales Order
input field and press
Enter
or click the Show Sales Order
button.
Check: The sales order and the sales order items are loaded and displayed in
the Sales Order Details
section.
- Change the
Quantity
value of the item with product HT-1022
to the value 1
, set its Note
to No message
and save it.
Check: There are no messages for the modified sales order item.
Check: Remember the number of messages.
- Change the modified sales order item's
Quantity
value to 2
and save it.
Check: The number of messages has been increased by 1.
Check: The fields of the sales order item's Quantity
and also
the Note
have borders indicating the warning For a quantity
greater than 1 you need an approval reason
.
- Open the message popover.
Check: There is exactly one warning with the message For a quantity
greater than 1 you need an approval reason
for that item.
- Navigate to the message details and click on
Technical Details
link
to open the Message Details
dialog.
Check: The values for Target
and Full Target
contain each two different paths.
- Close the
Message Details
dialog and close the message popover. Change
the modified sales order item's Note
value by adding the prefix
"Reason:"
and save it.
Check: The Quantity
and the Note
fields do not have
a warning border indicator anymore.
Check: The number of messages has been decreased by 1.
Check: The message has been removed from the message popover.
(IX) Messages returned from a function import
Search for a sales order with an item for the product HT-1000
. In case of mock
data: Use sales order 109
.
- Enter that sales order ID into the
Sales Order
input field and press
Enter
or click the Show Sales Order
button.
Check: The sales order and the sales order items are loaded and displayed in
the Sales Order Details
section.
Check: Remember the number of messages.
- Change the
Quantity
value of the item with product HT-1000
to the value 1
and save it.
Check: The number of messages has been increased by 1.
Check: There is a warning message for the quantity of the item that at least
2 have to be ordered.
- Make sure that the message popover is closed and press the
Fix
button
in the item's row.
Check: The Quantity
value has been changed to the value
2
.
Check: The number of messages has not changed.
Check: The previous warning message has disappeared.
Check: There is a new message that the quantity has been successfully
updated.
- Close the message popover.
Check: The number of messages has not been decreased.
(X) Suppress messages for the currency code if the code is not displayed by the control
Search for a sales order with an item for the product HT-1501
. In case of mock
data: Use sales order 110
.
- Enter that sales order ID into the
Sales Order
input field and press
Enter
or click the Show Sales Order
button.
Check: The sales order and the sales order items are loaded and displayed in
the Sales Order Details
section.
Check: In the message popover you see an information message
Avoid currency 'JPY'
.
Check: The border of the Currency
field of the sales order item
with the product HT-1501
indicates an information message.
Check: When clicking into the sales order item's Currency
field,
the message text Avoid currency 'JPY'
is shown.
Check: There is no border around the Gross Amount
field of that
sales order item.
Check: When clicking into the sales order item's Gross Amount
field, no info message is shown.
(XI) Clone a sales order item and expand product information
Search for a sales order with an item that has exactly one message for its
Quantity
. In case of mock data: Use sales order 111
.
- Enter that sales order ID into the
Sales Order
input field and press
Enter
or click the Show Sales Order
button.
Check: The sales order and the sales order items are loaded and displayed in
the Sales Order Details
section.
- Remember the number of messages.
- Remember the
Gross Amount
and the Changed At
data from the
Sales Order
section.
- In the
Sales Order Items
table select the item with a message for its
Quantity
.
- Click on the
Clone Item
button of the Sales Order Items
table.
Check: The item is cloned, that means an additional item is added to the
Sales Order Items
table with the same data as the selected item,
except the Item Position
and the Note
.
Check: The number of massages has been increased by 1.
Check: The cloned item has the same message as the selected item.
Check: The Gross Amount
and the Changed At
values
are updated.
- Only with back end: Open the developer tools,
navigate to the network tab, clear the requests and filter for
$batch
requests.
- In the
Sales Order Items
table click on the >
at the
end of the row for the cloned item to open the product details.
Check: A Product Details
dialog is opened showing the
Product ID
and the corresponding product Name
.
Only with back end: Check: There is no
$batch
request.
- Close the
Product Details
dialog.