Skip to content

Commit

Permalink
[Behat] Update scenarios with I generate its slug step
Browse files Browse the repository at this point in the history
  • Loading branch information
Rafikooo committed May 23, 2024
1 parent c55a7ee commit 96015f3
Show file tree
Hide file tree
Showing 10 changed files with 20 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ Feature: Adding a new product with associations
When I want to create a new simple product
And I specify its code as "lg_g3"
And I name it "LG G3" in "English (United States)"
And I generate its slug in "English (United States)"
And I set its price to "$400.00" for "United States" channel
And I associate as "Accessories" the "LG headphones" and "LG earphones" products
And I associate as "Alternatives" the "LG G4" and "LG G5" products
Expand All @@ -29,6 +30,7 @@ Feature: Adding a new product with associations
When I want to create a new simple product
And I specify its code as "lg_g3"
And I name it "LG G3" in "English (United States)"
And I generate its slug in "English (United States)"
And I set its price to "$400.00" for "United States" channel
And I associate as "Accessories" the "LG headphones" and "LG earphones" products
And I remove an associated product "LG earphones" from "Accessories"
Expand All @@ -44,6 +46,7 @@ Feature: Adding a new product with associations
When I want to create a new simple product
And I specify its code as "lg_g3"
And I name it "LG G3" in "English (United States)"
And I generate its slug in "English (United States)"
And I set its price to "$400.00" for "United States" channel
And I associate as 123 the "LG headphones" and "LG earphones" products
And I add it
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ Feature: Adding a new product with images
When I want to create a new simple product
And I specify its code as "LAMBORGHINI_GALLARDO"
And I name it "Lamborghini Gallardo Model" in "English (United States)"
And I generate its slug in "English (United States)"
And I set its price to "$100.00" for "United States" channel
And I attach the "lamborghini.jpg" image with "banner" type
And I add it
Expand All @@ -24,6 +25,7 @@ Feature: Adding a new product with images
When I want to create a new simple product
And I specify its code as "LAMBORGHINI_GALLARDO"
And I name it "Lamborghini Gallardo Model" in "English (United States)"
And I generate its slug in "English (United States)"
And I set its price to "$100.00" for "United States" channel
And I attach the "lamborghini.jpg" image with "banner" type
And I attach the "lamborghini.jpg" image with "thumbnail" type
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ Feature: Adding a new product with a float attribute
When I want to create a new configurable product
And I specify its code as "display_size"
And I name it "Smartphone" in "English (United States)"
And I generate its slug in "English (United States)"
And I add the "Display Size" attribute to it
And I set its non-translatable "Display Size" attribute to 12.5
And I add it
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ Feature: Adding a new product with an integer attribute
When I want to create a new configurable product
And I specify its code as "44_MAGNUM"
And I name it "44 Magnum" in "English (United States)"
And I generate its slug in "English (United States)"
And I add the "Production year" attribute to it
And I set the "Production year" attribute value to 1955 in "English (United States)"
And I add it
Expand All @@ -27,6 +28,7 @@ Feature: Adding a new product with an integer attribute
When I want to create a new configurable product
And I specify its code as "44_MAGNUM"
And I name it "44 Magnum" in "English (United States)"
And I generate its slug in "English (United States)"
And I add the "Weight" attribute to it
And I set its non-translatable "Weight" attribute to 10
And I add it
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ Feature: Adding a new product with a percent attribute
When I want to create a new configurable product
And I specify its code as "44_MAGNUM"
And I name it "44 Magnum" in "English (United States)"
And I generate its slug in "English (United States)"
And I add the "Awesomeness rating" attribute to it
And I set the "Awesomeness rating" attribute value to 80 in "English (United States)"
And I add it
Expand All @@ -27,6 +28,7 @@ Feature: Adding a new product with a percent attribute
When I want to create a new configurable product
And I specify its code as "44_MAGNUM"
And I name it "44 Magnum" in "English (United States)"
And I generate its slug in "English (United States)"
And I add the "Accuracy" attribute to it
And I set its non-translatable "Accuracy" attribute to 95
And I add it
Expand All @@ -39,6 +41,7 @@ Feature: Adding a new product with a percent attribute
When I want to create a new configurable product
And I specify its code as "44_MAGNUM"
And I name it "44 Magnum" in "English (United States)"
And I generate its slug in "English (United States)"
And I set the invalid string value of the non-translatable "Accuracy" attribute to "ninety"
And I try to add it
Then I should be notified that the value of the "Accuracy" attribute has invalid type
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ Feature: Adding a new product with a select attribute
When I want to create a new configurable product
And I specify its code as "mug"
And I name it "PHP Mug" in "English (United States)"
And I generate its slug in "English (United States)"
And I add the "Mug material" attribute
And I select "Ceramic" value for the "Mug material" attribute
And I add it
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ Feature: Adding a new product with text attribute
When I want to create a new configurable product
And I specify its code as "44_MAGNUM"
And I name it "44 Magnum" in "English (United States)"
And I generate its slug in "English (United States)"
And I add the "Gun caliber" attribute
And I set the "Gun caliber" attribute value to "11 mm" in "English (United States)"
And I add it
Expand All @@ -28,6 +29,7 @@ Feature: Adding a new product with text attribute
When I want to create a new configurable product
And I specify its code as "44_MAGNUM"
And I name it "44 Magnum" in "English (United States)"
And I generate its slug in "English (United States)"
And I add the "Author" attribute to it
And I set its non-translatable "Author" attribute to "Colt"
And I add it
Expand All @@ -40,6 +42,7 @@ Feature: Adding a new product with text attribute
When I want to create a new configurable product
And I specify its code as "44_MAGNUM"
And I name it "44 Magnum" in "English (United States)"
And I generate its slug in "English (United States)"
And I add the "Gun caliber" attribute
And I set the "Gun caliber" attribute value to "11 mm" in "English (United States)"
And I add the "Overall length" attribute
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ Feature: Adding select attributes in different locales to a product
When I want to create a new configurable product
And I specify its code as "mug"
And I name it "PHP Mug" in "English (United States)"
And I generate its slug in "English (United States)"
And I add the "Mug material" attribute
And I select "Ceramic" value in "English (United States)" for the "Mug material" attribute
And I select "Ceramika" value in "Polish (Poland)" for the "Mug material" attribute
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ Feature: Adding text attributes in different locales to a product
When I want to create a new configurable product
And I specify its code as "mug"
And I name it "PHP Mug" in "English (United States)"
And I generate its slug in "English (United States)"
And I add the "Mug material" attribute
And I set the "Mug material" attribute value to "Wood" in "English (United States)"
And I set the "Mug material" attribute value to "Drewno" in "Polish (Poland)"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ Feature: Products validation
When I want to create a new simple product
And I specify its code as "AWESOME_GAME"
And I name it "Dice Brewing" in "English (United States)"
And I generate its slug in "English (United States)"
And I set its price to "$10.00" for "Web" channel
And I try to add it
Then I should be notified that code has to be unique
Expand Down Expand Up @@ -71,7 +72,7 @@ Feature: Products validation
Then I should be notified that name is required
And product with code "BOARD_DICE_BREWING" should not be added

@ui @mink:chromedriver @no-api
@ui @no-api
Scenario: Adding a new simple product without specifying its price for every channel
Given the store operates on another channel named "Web-GB"
When I want to create a new simple product
Expand All @@ -80,7 +81,7 @@ Feature: Products validation
And I make it available in channel "Web-GB"
And I set its price to "$10.00" for "Web" channel
And I name it "Dice Brewing" in "English (United States)"
And I generate its slug in "English (United States)"
And I set its slug to "dice-brewing"
And I try to add it
Then I should be notified that price must be defined for every channel
And product with code "BOARD_DICE_BREWING" should not be added
Expand Down

0 comments on commit 96015f3

Please sign in to comment.