Manual Integration Test: Currency and unit amount in two fields

DESCRIPTION

Test for showing and entering unit or currency amounts in two fields based on the sap.ui.model.odata.type.Unit or sap.ui.model.odata.type.Currency.

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. You can start the Two Fields for Unit and Currency application with the following URL (adjust host and port if necessary) http://localhost:8080/test-resources/sap/ui/core/internal/samples/odata/twoFields/index.html?sap-ui-language=EN. Note: Each test has a specific initial state corresponding to parameters for the application URL; you find the corresponding application URL with the respective test.

REALIZE and CHECK

1) Entry of amount (step 1) and currency (step 2) in previously empty input fields (success case)

Start http://localhost:8080/test-resources/sap/ui/core/internal/samples/odata/twoFields/index.html?unit=&sap-ui-language=EN. Enter value "100" and press return. Enter unit "DEG" and press return. Start http://localhost:8080/test-resources/sap/ui/core/internal/samples/odata/twoFields/index.html?currency=&sap-ui-language=EN. Enter value "100" and press return. Enter currency "JPY" and press return. Enter currency "USDN" and press return.

2) Entry of amount (step 1) and currency (step 2) in previously empty input fields (error case)

Start http://localhost:8080/test-resources/sap/ui/core/internal/samples/odata/twoFields/index.html?currency=&sap-ui-language=EN. Enter value "100.1" and press return. Enter currency "JPY" and press return.

3) Currency is already available, the user enters an invalid amount.

Start http://localhost:8080/test-resources/sap/ui/core/internal/samples/odata/twoFields/index.html?currency=JPY&sap-ui-language=EN. Enter value "100.1" and press return.

4) Currency is already available, the user enters a valid amount.

Start http://localhost:8080/test-resources/sap/ui/core/internal/samples/odata/twoFields/index.html?currency=JPY&sap-ui-language=EN. Enter value "100" and press return.

5) Currency is available, the field is not editable or enabled. The user enters an invalid amount.

For testing with a not editable field, start http://localhost:8080/test-resources/sap/ui/core/internal/samples/odata/twoFields/index.html?currency=JPY~readonly&sap-ui-language=EN. Enter value "100.1" and press return. Repeat this test with a disabled field, start http://localhost:8080/test-resources/sap/ui/core/internal/samples/odata/twoFields/index.html?currency=JPY~disabled&sap-ui-language=EN.

6) Amount is in a not editable or enabled field, currency is changed so that the amount has too many decimal places.

For testing with a not editable field, start http://localhost:8080/test-resources/sap/ui/core/internal/samples/odata/twoFields/index.html?currency=EUR&value=100.1~readonly&sap-ui-language=EN. Enter currency "JPY" and press return. Repeat this test with a disabled field, start http://localhost:8080/test-resources/sap/ui/core/internal/samples/odata/twoFields/index.html?currency=EUR&value=100.1~disabled&sap-ui-language=EN.

7) Entry of amount (step 1) and new currency (step 2) with previously available currency (success case)

Start http://localhost:8080/test-resources/sap/ui/core/internal/samples/odata/twoFields/index.html?currency=EUR&sap-ui-language=EN. Enter value "100" and press return. Enter currency "JPY" and press return.

8) Entry of amount (step 1) and new currency (step 2) with previously available currency (error case)

Start http://localhost:8080/test-resources/sap/ui/core/internal/samples/odata/twoFields/index.html?currency=EUR&sap-ui-language=EN. Enter value "100.1" and press return. Enter currency "JPY" and press return.

9) The backend sends an invalid quantity: No error is shown

Start http://localhost:8080/test-resources/sap/ui/core/internal/samples/odata/twoFields/index.html?unit=KG&value=1.54&sap-ui-language=EN.

10) Entry of an invalid unit

Start http://localhost:8080/test-resources/sap/ui/core/internal/samples/odata/twoFields/index.html?currency=EUR&value=1.23&sap-ui-language=EN. Enter currency "WRONG" and press return.

11) Invalid currency amount can be fixed by changing to a valid matching currency

Start http://localhost:8080/test-resources/sap/ui/core/internal/samples/odata/twoFields/index.html?currency=JPY&value=1&sap-ui-language=EN. Enter value "2.34" and press return. Enter currency "EUR" and press return.

12) Invalid value at one part only shown at that part

Start http://localhost:8080/test-resources/sap/ui/core/internal/samples/odata/twoFields/index.html?currency=EUR&sap-ui-language=EN. Enter value "-1" and press return. Enter value "5" and press return.

13) Changing a non parsable value to a value that leads to a ValidateException on both parts leads to both parts highlighted

Start http://localhost:8080/test-resources/sap/ui/core/internal/samples/odata/twoFields/index.html?unit=M%2FL&value=2.1&sap-ui-language=EN. Enter unit "XYZ" and press return. Enter unit "KG" and press return. Enter value "2" and press return.

14) Changing to a different valid value after entering a non-parsable unit must keep the illegal unit. Correction to the unit writes both value and unit to the model. The same applies when changing roles of value and unit.

Start http://localhost:8080/test-resources/sap/ui/core/internal/samples/odata/twoFields/index.html?unit=KG&value=2&sap-ui-language=EN. Enter unit "XYZ" and press return. Enter value "3" and press return. Enter unit "DEG" and press return. Enter value "ABC" and press return. Enter unit "M/L" and press return. Enter value "4.1" and press return.