Ananas APItest bench
staging api.qa2.ananastest.com
TC-ADD-06 Functional changes data

Automated daily catalog submission

Verify that catalog submission is configured to run once a day as a consolidated set of products

! Documented discrepancy · errors.txt

The automated submission test is unfeasible in the test suite environment, can be handled via CRON job or tools that rely on CRON (for example, Events in the Laravel framework).

All tests in this section: All the import tests return the code 202 and not 200 in case of success.

Specification · xlsx

Steps

  1. Configure the automated submission trigger
  2. Wait for the scheduled execution time
  3. Verify that a single consolidated request was sent

Expected result

During the day, one request is executed containing the complete set of unlisted products

Endpoints

POST /product/api/v1/merchant-integration/import

Run

API_URL
https://api.qa2.ananastest.com

Change parameters

A dry run builds every request without sending it; responses come from a local stub.

Test code

mirrors tests/ImportTest.php::tc_add_06()
176// Verify that catalog submission is configured
177// to run once a day as a consolidated set of products
178public function tc_add_06(): void
179{
180 // Automation logic should be handled via CRON
181 $newItem = [
182 'name' => 'test',
183 'description' => 'test',
184 'coverImage' => 'test',
185 'ean' => 'test',
186 ];
187
188 $response = $this->ananas->addOrEditInBulk([$newItem]);
189 $this->assertEquals(202, $response['statusCode']);
190}

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.