# Manual Integration Test: Multiple Inline Creation Rows Grid

## DESCRIPTION

Test of the Multiple Inline Creation Rows Grid application.

## 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 Multiple Inline Creation Rows Grid application with following URL (adjust host and port if necessary): http://<host>:<port>/test-resources/sap/ui/core/demokit/sample/common/index.html?component=odata.v4.MultipleInlineCreationRowsGrid

## REALIZE and CHECK

### Test the app within draft mode and non-draft mode.

To start the app in non-draft mode simply add URL parameter "&updateGroupId=update" to the above URL http://<host>:<port>/test-resources/sap/ui/core/demokit/sample/common/index.html?component=odata.v4.MultipleInlineCreationRowsGrid&updateGroupId=update For non-draft mode the app has additional `Save` and `Cancel` buttons and the test description differs a little.

1. Check: A list with two empty rows, followed by three products appears.
2. Select the first product with ID "10".
3. Check: A table with title "Product 10, 3 Parts" appears. It contains three product parts, followed by two empty rows.
4. Check: The `Delete part` button is active for the persisted parts and inactive for the empty rows.
5. Enter "99" into the `ID` field of the first empty row and press "Enter" key.
6. Check: The `Delete part` button of the row becomes active.
7. Check: The table title changes to "Product 10, 4 Parts".
8. Check: A new empty row appears.
9. Within non-draft mode:
   1. Check: The product with ID "99" now has the state "Transient".
   2. Press `Save`.
   3. Check: The product with ID "99" now has the state "Persisted".
10. Within draft mode:
    1. Check: The product with ID "99" now has the state "Persisted".
11. Enter "100" into the `ID` field of the first empty row and press "Enter" key, within non-draft press `Save`.
12. Check: An error message "Key exists already" appears.
13. Check: The `ID` field has a colored border indicating the error.
14. Check: The `Delete part` button of the row becomes active.
15. Check: The table title changes to "Product 10, 5 Parts".
16. Check: A new empty row appears.
17. Within non-draft mode:
    1. Press `Cancel`.
    2. Check: The table title changes to "Product 10, 4 Parts".
    3. Check: The row with `ID` "100" disappears.
    4. Enter "101" into the `ID` field of the first empty row and press "Enter" key.
    5. Check: The `Delete part` button of the row becomes active.
    6. Check: The table title changes to "Product 10, 5 Parts".
    7. Check: A new empty row appears.
    8. Press `Save`.
    9. Check: The product with `ID` "101" now has the state "Persisted".
    10. Click on The `Delete part` button of the fourth row with the ID "101".
    11. Confirm the dialog with clicking on `Ok`.
    12. Check: The table title changes to "Product 10, 4 Parts".
    13. Check: The row disappears.
    14. Select the second product with ID "20".
    15. Check: The table title changes to "Product 20, 3 Parts".
    16. Check: You see 3 "Persisted" and 2 "Inactive" parts.
    17. Enter "222" into the `ID` field of the first empty row and press "Enter" key
    18. Check: The product with ID "222" now has the state "Transient".
    19. Select the first product with ID "10".
    20. Select the second product with ID "20".
    21. Check: The product with ID "222" is visible again and has the state "Transient" and again there are 2 empty rows.
18. Within draft mode:
    1. Enter "101" into the `ID` field of the first empty row and press "Enter" key.
    2. Check: The `Delete part` button of the row becomes active.
    3. Check: The table title changes to "Product 10, 6 Parts".
    4. Check: A new empty row appears.
    5. Click on The `Delete part` button of the fifth row with the ID "100".
    6. Confirm the dialog with clicking on `Ok`.
    7. Check: The table title changes to "Product 10, 5 Parts".
    8. Check: The row disappears.
    9. Select the second product with ID "20".
    10. Check: The table title changes to "Product 20, 3 Parts".
    11. Select the first product with ID "10".
    12. Check: The table title changes to "Product 10, 5 Parts".
    13. Check: You see 5 rows with state "From Server" and 2 empty rows.
    14. Check: The 5 rows with state "From Server" have now a different description than before because they are reread again.
    15. Select the second product with ID "20".
    16. Check: The table title changes to "Product 20, 3 Parts".
    17. Check: You see 3 "Persisted" and 2 "Inactive" parts.
19. Press `Quantity` button in parts table header.
20. Check: The parts table is sorted by quantity ascending and the empty rows are still at the end.
21. Press `Refresh`.
22. Check: The parts table did not change.
23. Enter "100" into the `ID` field of the last empty row of the Products list and press Enter
24. Check: The list title changes to "4 Products".
25. Check: A new empty row appears below.

### Test the app with legacy placement of inline creation rows

To start the app with legacy placement add URL parameter "&legacy=true" to the above URL http://<host>:<port>/test-resources/sap/ui/core/demokit/sample/common/index.html?component=odata.v4.MultipleInlineCreationRowsGrid&legacy=true

1. Check: A list with two empty rows, followed by three products appears.
2. Select the first product with ID "10".
3. Check: A table with title "Product 10, 3 Parts" appears. It contains two empty rows, followed by three product parts.
4. Check: The `Delete part` button is active for the persisted parts and inactive for the empty rows.
5. Enter "99" into the `ID` field of the last empty row and press "Enter" key.
6. Check: The `Delete part` button of the row becomes active.
7. Check: The table title changes to "Product 10, 4 Parts".
8. Check: A new empty row appears above.
9. Check: The product with ID "99" now has the state "Persisted".
10. Enter "100" into the `ID` field of the last empty row and press "Enter" key.
11. Check: An error message "Key exists already" appears.
12. Check: The `ID` field has a colored border indicating the error.
13. Check: The `Delete part` button of the row becomes active.
14. Check: The table title changes to "Product 10, 5 Parts".
15. Check: A new empty row appears above.
16. Enter "101" into the `ID` field of the last empty row and press "Enter" key.
17. Check: The `Delete part` button of the row becomes active.
18. Check: The table title changes to "Product 10, 6 Parts".
19. Check: A new empty row appears.
20. Click on The `Delete part` button of the fourth row with the ID "100".
21. Confirm the dialog with clicking on `Ok`.
22. Check: The table title changes to "Product 10, 5 Parts".
23. Check: The row disappears.
24. Select the second product with ID "20".
25. Check: The table title changes to "Product 20, 3 Parts".
26. Select the first product with ID "10".
27. Check: The table title changes to "Product 10, 5 Parts".
28. Check: You see 5 rows with state "From Server" and 2 empty rows.
29. Check: The 5 rows with state "From Server" have now a different description than before because they are reread again.
30. Select the second product with ID "20".
31. Check: The table title changes to "Product 20, 3 Parts".
32. Check: You see 2 "Inactive" empty rows and 3 "From Server" parts.
33. Press `Quantity` button in parts table header.
34. Check: The parts table is sorted by quantity ascending and the empty rows are still at the top.
35. Press `Refresh`.
36. Check: The parts table did not change.