TC-STOCK-04
Negative
changes data Sending a request for an ID from the Ananas warehouse
Verify that quantity is not updated for a product located in the Ananas warehouse
! Documented discrepancy · errors.txt
The test fails because there are no products in the Ananas warehouse in the provided dataset.
Specification · xlsx
Steps
- Attempt to update quantity for an ID belonging to the Ananas warehouse
Expected result
HTTP 200; the system rejects the update and returns an error in the response
Endpoints
PUT /product/api/v1/merchant-integration/product/bulk Run
- API_URL
https://api.qa2.ananastest.com- ITEM_IN_ANANAS_WAREHOUSE_ID
2555661
A dry run builds every request without sending it; responses come from a local stub.
Test code
mirrors tests/BulkTest.php::tc_stock_04()
218// Verify that quantity is not updated for a product located in the Ananas warehouse
219public function tc_stock_04(): void
220{
221 $targetId = (int) $_ENV['ITEM_IN_ANANAS_WAREHOUSE_ID'];
222
223 $productData = [
224 [
225 'id' => $targetId,
226 'stockLevel' => 123,
227 ],
228 ];
229
230 $response = $this->ananas->editInBulk($productData);
231
232 $this->assertEquals(200, $response['statusCode']);
233 $this->assertEquals('FAIL', $response['response'][0]['status']);
234}
web/app/Scenarios/BulkScenarios.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.