TC-DISC-14
Negative
changes data Changing the duration after it starts
Verify that the period cannot be changed
There is no parameter named “validTo”. The attempt to change the “newDataTo” on the ongoing discount leads to success, invalidating the expected result. The only date change that leads to an error is the change to “newDataFrom”.
All tests in this section: The discount tests are tricky because they involve persistent changes to the real data. To mitigate this problem and automate the tests, every discount is cancelled after the test. The ongoing promotion cannot be cancelled, and therefore have to be reused for these tests.
Specification · xlsx
Steps
- Promotion has started
- Attempt to modify validTo
Expected result
The system rejects the request
Endpoints
POST · PUT · GET /payment/api/v1/merchant-integration/discountsPUT /payment/api/v1/merchant-integration/discounts/{id}/cancellations Run
- API_URL
https://api.qa2.ananastest.com- TARGET_ID
2555660- DISCOUNT_PRICE
10000
A dry run builds every request without sending it; responses come from a local stub.
Test code
mirrors tests/DiscountsTest.php::tc_disc_14()
web/app/Scenarios/DiscountsScenarios.php · line numbers refer to this file
Not run yet. Run it against the API, or do a dry run to see the requests it would send.