-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
WIP: refactor behat enqueuing products test (#123)
- Loading branch information
Showing
17 changed files
with
369 additions
and
62 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
@importing_generic_items | ||
Feature: Importing items | ||
In order to import data from Akeneo | ||
As an Administrator | ||
I want to import items from the Akeneo PIM | ||
|
||
Background: | ||
Given I am logged in as an administrator | ||
And the store has a product association type "Pack" with a code "PACK" | ||
|
||
@cli @ui | ||
Scenario: Importing items when no item is modified since the given date | ||
When I import items for all importers modified since date "2020-01-20 01:00:00" | ||
And I browse products | ||
Then I should see 0 products in the list | ||
|
||
@cli @ui | ||
Scenario: Importing items without a since date | ||
When I import items for all importers with no since date | ||
Then I should be notified that a since date is required | ||
When I browse products | ||
Then I should see 0 products in the list | ||
|
||
@cli @ui | ||
Scenario: Importing items with an invalid since date | ||
When I import items for all importers with invalid since date | ||
Then I should be notified that the since date must be a valid date | ||
When I browse products | ||
Then I should see 0 products in the list | ||
|
||
@cli @ui | ||
Scenario: Importing items with a since date specified from a not existent file | ||
When I import items with since date specified from a not existent file | ||
Then I should be notified that the since date file does not exists | ||
When I browse products | ||
Then I should see 0 products in the list | ||
|
||
@cli @ui | ||
Scenario: Importing all items regardless last modified date | ||
Given there is a product "1314976" updated at "2022-06-15" on Akeneo | ||
And there is a product "10597353" updated at "2022-07-23" on Akeneo | ||
And there is a product "11164822" updated at "2022-08-01" on Akeneo | ||
When I import all items for all importers | ||
And I browse products | ||
Then I should see 3 products in the list | ||
And the product with code "11164822" should have an association "Pack" with product "10597353" | ||
|
||
@cli @ui | ||
Scenario: Importing all items for one importer only | ||
Given there is a product "1314976" updated at "2022-06-15" on Akeneo | ||
And there is a product "10597353" updated at "2022-07-23" on Akeneo | ||
And there is a product "11164822" updated at "2022-08-01" on Akeneo | ||
When I import all items for the "Product" importer | ||
And I browse products | ||
Then I should see 3 products in the list | ||
And the product with code "11164822" should not have an association "Pack" with product "10597353" | ||
|
||
@cli @ui | ||
Scenario: Enqueuing all items for a not existent importer | ||
When I import all items for a not existent importer | ||
Then I should be notified that the importer does not exists | ||
When I browse products | ||
Then I should see 0 products in the list |
2 changes: 1 addition & 1 deletion
2
features/enqueuing_products.feature → features/importing_products.feature
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...s/enqueuing_products_associations.feature → ...s/importing_products_associations.feature
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
framework: | ||
messenger: | ||
transports: | ||
main: 'in-memory://' | ||
main: 'sync://' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
82 changes: 82 additions & 0 deletions
82
tests/Integration/DataFixtures/ApiClientMock/Product/10597353.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,82 @@ | ||
{ | ||
"identifier": "10597353", | ||
"enabled": true, | ||
"family": "loudspeakers", | ||
"categories": [ | ||
"audio_video_sales", | ||
"loudspeakers", | ||
"nec" | ||
], | ||
"groups": [], | ||
"parent": null, | ||
"values": { | ||
"picture": [ | ||
{ | ||
"locale": null, | ||
"scope": null, | ||
"data": "6/5/8/8/65887ee600d9d66e829a75beedf374533b1ff8bc_10597353_1104.jpg", | ||
"_links": { | ||
"download": { | ||
"href": "http://127.0.0.1:8081/api/rest/v1/media-files/6/5/8/8/65887ee600d9d66e829a75beedf374533b1ff8bc_10597353_1104.jpg/download" | ||
} | ||
} | ||
} | ||
], | ||
"name": [ | ||
{ | ||
"locale": null, | ||
"scope": null, | ||
"data": "NEC SP-4046PV" | ||
} | ||
], | ||
"description": [ | ||
{ | ||
"locale": "de_DE", | ||
"scope": "print", | ||
"data": "Dem edlen Design der Displays angepasst und mit wenigen Handgriffen montiert bzw. demontiert." | ||
}, | ||
{ | ||
"locale": "en_US", | ||
"scope": "print", | ||
"data": "Enhance your Large-Screen Display Speakers without breaking your budget with NEC's SP-4046PV." | ||
}, | ||
{ | ||
"locale": "fr_FR", | ||
"scope": "print", | ||
"data": "Adapté au design des moniteurs LCD NEC Public Display, montage et démontage faciles." | ||
} | ||
], | ||
"release_date": [ | ||
{ | ||
"locale": null, | ||
"scope": "ecommerce", | ||
"data": "2011-08-07T00:00:00+00:00" | ||
} | ||
] | ||
}, | ||
"created": "2022-04-14T13:14:05+00:00", | ||
"updated": "2022-04-14T13:14:05+00:00", | ||
"associations": { | ||
"PACK": { | ||
"products": [], | ||
"product_models": [], | ||
"groups": [] | ||
}, | ||
"UPSELL": { | ||
"products": [], | ||
"product_models": [], | ||
"groups": [] | ||
}, | ||
"X_SELL": { | ||
"products": [], | ||
"product_models": [], | ||
"groups": [] | ||
}, | ||
"SUBSTITUTION": { | ||
"products": [], | ||
"product_models": [], | ||
"groups": [] | ||
} | ||
}, | ||
"quantified_associations": {} | ||
} |
Oops, something went wrong.