Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Behat][Api] Second part of fixing simple product creation in api tests #13626

Merged
merged 2 commits into from
Feb 9, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Feature: Adding a new product with associations
And the store has "LG headphones", "LG earphones", "LG G4" and "LG G5" products
And I am logged in as an administrator

@ui @javascript
@ui @javascript @no-api
Scenario: Adding a new product with associations
When I want to create a new simple product
And I specify its code as "lg_g3"
Expand All @@ -24,7 +24,7 @@ Feature: Adding a new product with associations
And this product should also have an association "Alternatives" with products "LG G4" and "LG G5"
And the product "LG G3" should appear in the store

@ui @javascript
@ui @javascript @no-api
Scenario: Adding a new product with associations after changing associated items
When I want to create a new simple product
And I specify its code as "lg_g3"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Feature: Adding a new product with an integer attribute
And the store has a non-translatable integer product attribute "Weight"
And I am logged in as an administrator

@ui @javascript
@ui @javascript @no-api
Scenario: Adding an integer attribute to product
When I want to create a new simple product
And I specify its code as "44_MAGNUM"
Expand All @@ -22,7 +22,7 @@ Feature: Adding a new product with an integer attribute
And the product "44 Magnum" should appear in the store
And attribute "Production year" of product "44 Magnum" should be "1955"

@ui @javascript
@ui @javascript @no-api
Scenario: Adding an integer non-translatable attribute to product
When I want to create a new simple product
And I specify its code as "44_MAGNUM"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Feature: Adding a new product with a percent attribute
And the store has a non-translatable percent product attribute "Accuracy"
And I am logged in as an administrator

@ui @javascript
@ui @javascript @no-api
Scenario: Adding a percent attribute to product
Given I want to create a new simple product
When I specify its code as "44_MAGNUM"
Expand All @@ -22,7 +22,7 @@ Feature: Adding a new product with a percent attribute
And the product "44 Magnum" should appear in the store
And attribute "Awesomeness rating" of product "44 Magnum" should be "80"

@ui @javascript
@ui @javascript @no-api
Scenario: Adding a non-translatable percent attribute to product
When I want to create a new simple product
And I specify its code as "44_MAGNUM"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ Feature: Adding product with prices for multiple channels
And I add it
Then I should be notified that price must be defined for every channel

@ui
@ui @no-api
Scenario: Require prices only for chosen channels
When I want to create a new simple product
And I specify its code as "BOARD_DICE_BREWING"
Expand All @@ -45,7 +45,7 @@ Feature: Adding product with prices for multiple channels
Then I should be notified that it has been successfully created
And product "Dice Brewing" should be priced at $10.00 for channel "Web-US"

@ui
@ui @no-api
Scenario: Require prices for all chosen channels
When I want to create a new simple product
And I specify its code as "BOARD_DICE_BREWING"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Feature: Adding a new product with text attribute
And the store has a non-translatable text product attribute "Author"
And I am logged in as an administrator

@ui @javascript
@ui @javascript @no-api
Scenario: Adding a text attribute to product
Given I want to create a new simple product
When I specify its code as "44_MAGNUM"
Expand All @@ -23,7 +23,7 @@ Feature: Adding a new product with text attribute
And the product "44 Magnum" should appear in the store
And attribute "Gun caliber" of product "44 Magnum" should be "11 mm"

@ui @javascript
@ui @javascript @no-api
Scenario: Adding a non-translatable text attribute to product
When I want to create a new simple product
And I specify its code as "44_MAGNUM"
Expand All @@ -35,7 +35,7 @@ Feature: Adding a new product with text attribute
And the product "44 Magnum" should appear in the store
And non-translatable attribute "Author" of product "44 Magnum" should be "Colt"

@ui @javascript
@ui @javascript @no-api
Scenario: Adding and removing text attributes on product create page
When I want to create a new simple product
And I specify its code as "44_MAGNUM"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Feature: Adding text attributes in different locales to a product
And the store has a text product attribute "Mug material"
And I am logged in as an administrator

@ui @javascript
@ui @javascript @no-api
Scenario: Adding a product with a text attribute in different locales
When I want to create a new simple product
And I specify its code as "mug"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Feature: Toggle the inventory tracking
Given the store has a product "Dice Brewing"
And I am logged in as an administrator

@ui
@ui @no-api
Scenario: Disabling inventory for a simple product
Given the "Dice Brewing" product is tracked by the inventory
And I want to modify the "Dice Brewing" product
Expand All @@ -17,7 +17,7 @@ Feature: Toggle the inventory tracking
Then I should be notified that it has been successfully edited
And inventory of this product should not be tracked

@ui
@ui @no-api
Scenario: Enabling inventory for a simple product
Given I want to modify the "Dice Brewing" product
When I enable its inventory tracking
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Feature: Toggle the product
Given the store has a product "Dice Brewing"
And I am logged in as an administrator

@ui
@ui @no-api
Scenario: Disabling a simple product
Given the "Dice Brewing" product is enabled
And I want to modify the "Dice Brewing" product
Expand All @@ -17,7 +17,7 @@ Feature: Toggle the product
Then I should be notified that it has been successfully edited
And this product should be disabled along with its variant

@ui
@ui @no-api
Scenario: Enabling a simple product
Given the "Dice Brewing" product is disabled
And I want to modify the "Dice Brewing" product
Expand Down
8 changes: 4 additions & 4 deletions features/product/managing_products/editing_product.feature
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,15 @@ Feature: Editing a product
When I want to modify the "Dice Brewing" product
Then I should not be able to edit its code

@ui @api
@ui @no-api
Scenario: Renaming a simple product
Given I want to modify the "Dice Brewing" product
When I rename it to "7 Wonders" in "English (United States)"
And I save my changes
Then I should be notified that it has been successfully edited
And this product name should be "7 Wonders"

@ui
@ui @no-api
Scenario: Renaming a simple product does not change its variant name
Given this product only variant was renamed to "Dice Brewing: The Game"
And I want to modify this product
Expand All @@ -31,15 +31,15 @@ Feature: Editing a product
And I want to view all variants of this product
Then the first variant in the list should have name "Dice Brewing: The Game"

@ui
@ui @no-api
Scenario: Changing a simple product price
Given I want to modify the "Dice Brewing" product
When I change its price to $15.00 for "United States" channel
And I save my changes
Then I should be notified that it has been successfully edited
And it should be priced at $15.00 for channel "United States"

@ui
@ui @no-api
Scenario: Changing a simple product price
Given I want to modify the "Dice Brewing" product
When I change its price to $7.50 for "United States" channel
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Feature: Editing product's slug in multiple locales
And the store is also available in "Polish (Poland)"
And I am logged in as an administrator

@ui
@ui @no-api
Scenario: Creating a product with custom slugs
Given I want to create a new simple product
When I specify its code as "PUG_PUGGINTON_PLUSHIE"
Expand All @@ -24,7 +24,7 @@ Feature: Editing product's slug in multiple locales
Then the slug of the "Pug Pugginton Plushie" product should be "sir-pugginton" in the "English (United States)" locale
And the slug of the "Pug Pugginton Plushie" product should be "pan-mopsinski" in the "Polish (Poland)" locale

@ui @javascript
@ui @javascript @no-api
Scenario: Creating a product with autogenerated slugs
Given I want to create a new simple product
When I specify its code as "PUG_PUGGINTON_PLUSHIE"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ Feature: Products validation
Then I should be notified that slug has to be unique
And product with code "7-WONDERS-BABEL" should not be added

@ui @javascript
@ui @javascript @no-api
Scenario: Trying to add a new product with a text attribute without specifying its value in default locale
When I want to create a new simple product
And I specify its code as "X-18-MUG"
Expand All @@ -156,7 +156,7 @@ Feature: Products validation
Then I should be notified that I have to define the "Mug material" attribute in "English (United States)"
And product with code "X-18-MUG" should not be added

@ui @javascript
@ui @javascript @no-api
Scenario: Trying to add a new product with a text attribute without specifying its value in additional locale with proper length
When I want to create a new simple product
And I specify its code as "X-18-MUG"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Feature: Removing images of an existing product
Background:
Given I am logged in as an administrator

@ui @javascript
@ui @javascript @no-api
Scenario: Removing a single image of a simple product
Given the store has a product "Lamborghini Gallardo Model"
And this product has an image "lamborghini.jpg" with "thumbnail" type
Expand All @@ -27,7 +27,7 @@ Feature: Removing images of an existing product
Then I should be notified that it has been successfully edited
And this product should not have any images

@ui @javascript
@ui @javascript @no-api
Scenario: Removing all images of a simple product
Given the store has a product "Lamborghini Gallardo Model"
And this product has an image "lamborghini.jpg" with "thumbnail" type
Expand All @@ -51,7 +51,7 @@ Feature: Removing images of an existing product
Then I should be notified that it has been successfully edited
And this product should not have any images

@ui @javascript
@ui @javascript @no-api
Scenario: Removing only one image of a simple product
Given the store has a product "Lamborghini Gallardo Model"
And this product has an image "lamborghini.jpg" with "thumbnail" type
Expand All @@ -63,7 +63,7 @@ Feature: Removing images of an existing product
And this product should have an image with "main" type
But it should not have any images with "thumbnail" type

@ui @javascript
@ui @javascript @no-api
Scenario: Removing only one image of a simple product when all images have same type
Given the store has a product "Lamborghini Ford Model"
And this product has an image "lamborghini.jpg" with "thumbnail" type
Expand All @@ -86,7 +86,7 @@ Feature: Removing images of an existing product
And this product should have an image with "main" type
But it should not have any images with "thumbnail" type

@ui @javascript
@ui @javascript @no-api
Scenario: Adding multiple images and removing a single image of a simple product
Given the store has a product "Lamborghini Gallardo Model"
When I want to modify this product
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Feature: Select taxon for an existing product
Then I should be notified that it has been successfully edited
And main taxon of product "T-Shirt Banana" should be "T-Shirts"

@ui @javascript @api
@ui @javascript @no-api
Scenario: Specifying main taxon for simple product
When I want to modify the "T-Shirt Batman" product
And I choose main taxon "Sad"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,6 @@ public function iSwitchTheLocaleToTheLocale(string $localeCode): void

/**
* @When I want to create a new configurable product
* @When I want to create a new simple product
*/
public function iWantToCreateANewConfigurableProduct(): void
{
Expand Down