TC-ADD-05
Functional
changes data Verifying the ID in the response
Verify that the response returns a receipt confirmation ID
! Documented discrepancy · errors.txt
All tests in this section: All the import tests return the code 202 and not 200 in case of success.
Specification · xlsx
Steps
- Send a valid request
- Check the response
Expected result
The response contains an ID; the ID represents a receipt confirmation, not the listing status
Endpoints
POST /product/api/v1/merchant-integration/import Run
- API_URL
https://api.qa2.ananastest.com
A dry run builds every request without sending it; responses come from a local stub.
Test code
mirrors tests/ImportTest.php::tc_add_05()
161// Verify that the response returns a receipt confirmation ID
162public function tc_add_05(): void
163{
164 $newItem = [
165 'name' => 'test',
166 'description' => 'test',
167 'coverImage' => 'test',
168 'ean' => 'test',
169 ];
170
171 $response = $this->ananas->addOrEditInBulk([$newItem]);
172 $this->assertEquals(202, $response['statusCode']);
173 $this->assertNotEmpty($response['response']['id']);
174}
web/app/Scenarios/ImportScenarios.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.