diff --git a/features/adding_product_to_selected_wishlist.feature b/features/adding_product_to_selected_wishlist.feature index 8eb9761e..2991de27 100644 --- a/features/adding_product_to_selected_wishlist.feature +++ b/features/adding_product_to_selected_wishlist.feature @@ -1,18 +1,18 @@ @wishlist Feature: Adding a product to selected wishlist - In order to compare or buy products later - As a Visitor - I want to be able to add products to one of my wishlists + In order to compare or buy products later + As a Visitor + I want to be able to add products to one of my wishlists - Background: - Given the store operates on a single channel in "United States" - Given I am on "/" + Background: + Given the store operates on a single channel in "United States" + Given I am on "/" - @ui - Scenario: Adding a product to selected wishlist - And the store has a wishlist named "Wishlist1" - And the store has a wishlist named "Wishlist2" - And the store has a product "Jack Daniels Gentleman" priced at "$10.00" - And all store products appear under a main taxonomy - And I add "Jack Daniels Gentleman" to selected wishlist "Wishlist2" - And I should have "Jack Daniels Gentleman" in selected wishlists "Wishlist2" + @ui + Scenario: Adding a product to selected wishlist + And the store has a wishlist named "Wishlist1" + And the store has a wishlist named "Wishlist2" + And the store has a product "Jack Daniels Gentleman" priced at "$10.00" + And all store products appear under a main taxonomy + And I add "Jack Daniels Gentleman" to selected wishlist "Wishlist2" + And I should have "Jack Daniels Gentleman" in selected wishlists "Wishlist2" diff --git a/features/adding_product_to_wishlist.feature b/features/adding_product_to_wishlist.feature index a8d39fcb..fdf10257 100644 --- a/features/adding_product_to_wishlist.feature +++ b/features/adding_product_to_wishlist.feature @@ -1,43 +1,117 @@ -@wishlist +@wishlist @api_wishlist Feature: Adding a product to wishlist - In order to compare or buy products later - As a Visitor - I want to be able to add products to my wishlist - - Background: - Given the store operates on a single channel in "United States" - - @ui - Scenario: Adding a product to wishlist - Given the store has a product "Jack Daniels Gentleman" priced at "$10.00" - And all store products appear under a main taxonomy - When I add this product to wishlist - Then I should be notified that the product has been successfully added to my wishlist - And I should have one item in my wishlist - - @ui - Scenario: Adding a product variant to wishlist - Given the store has a product "Some other whiskey" priced at "$25.00" - And all store products appear under a main taxonomy - When I view product "Some other whiskey" - And I add this product to wishlist - Then I should be notified that the product has been successfully added to my wishlist - And I should have one item in my wishlist - - @ui - Scenario: Adding a product as anon user and signing in - Given the store has a product "Jimmy Beammy" priced at "$233.00" - And the store has a product "Ice ball" priced at "$144.00" - And all store products appear under a main taxonomy - When I add "Jimmy Beammy" product to my wishlist - And I log in to my account which already has "Ice ball" product in the wishlist - Then I should have 2 products in my wishlist - - @ui - Scenario: Adding a wishlist product signing in and out and in - Given the store has a product "Red Roses" priced at "$12.00" - And I have this product in my wishlist - When I log in - And I log out - And I log in again - Then I should have one item in my wishlist + In order to compare or buy products later + As a Visitor + I want to be able to add products to my wishlist + + Background: + Given the store operates on a single channel in "United States" + + @ui + Scenario: Adding a product to wishlist + Given the store has a product "Jack Daniels Gentleman" priced at "$10.00" + And all store products appear under a main taxonomy + When I add this product to wishlist + Then I should be notified that the product has been successfully added to my wishlist + And I should have one item in my wishlist + + @ui + Scenario: Adding a product variant to wishlist + Given the store has a product "Some other whiskey" priced at "$25.00" + And all store products appear under a main taxonomy + When I view product "Some other whiskey" + And I add this product to wishlist + Then I should be notified that the product has been successfully added to my wishlist + And I should have one item in my wishlist + + @ui + Scenario: Adding a product as anon user and signing in + Given the store has a product "Jimmy Beammy" priced at "$233.00" + And the store has a product "Ice ball" priced at "$144.00" + And all store products appear under a main taxonomy + When I add "Jimmy Beammy" product to my wishlist + And I log in to my account which already has "Ice ball" product in the wishlist + Then I should have 2 products in my wishlist + + @ui + Scenario: Adding a wishlist product signing in and out and in + Given the store has a product "Red Roses" priced at "$12.00" + And I have this product in my wishlist + When I log in + And I log out + And I log in again + Then I should have one item in my wishlist + + @api + Scenario: Adding a product to wishlist with API as an anonymous user + Given user has a wishlist + And the store has a product "Jack Daniels Gentleman" priced at "$10.00" + When user adds product "Jack Daniels Gentleman" to the wishlist + Then user should have product "Jack Daniels Gentleman" in the wishlist + + @api + Scenario: Adding a product to wishlist with API as an authenticated user + Given there is a user "test@example.com" + And user "test@example.com" "sylius" is authenticated + And the store has a product "Jack Daniels Gentleman" priced at "$10.00" + When user has a wishlist + And user adds product "Jack Daniels Gentleman" to the wishlist + Then user should have product "Jack Daniels Gentleman" in the wishlist + + @api + Scenario: Anonymous user tries to add product to another user's wishlist with API + Given there is a user "test@example.com" + And user "test@example.com" "sylius" is authenticated + And the store has a product "Jack Daniels Gentleman" priced at "$10.00" + When user has a wishlist + And user is unauthenticated + Then user tries to add product "Jack Daniels Gentleman" to the wishlist + + @api + Scenario: Authenticated user tries to add product to another user's wishlist with API + Given there is a user "test@example.com" + And user "test@example.com" "sylius" is authenticated + And the store has a product "Jack Daniels Gentleman" priced at "$10.00" + When user has a wishlist + And there is a user "test1@example.com" + And user "test1@example.com" "sylius" is authenticated + Then user tries to add product "Jack Daniels Gentleman" to the wishlist + + @api + Scenario: Adding a product variant to wishlist with API as an anonymous user + Given user has a wishlist + And the store has a product "Jack Daniels Gentleman" priced at "$10.00" + And the product "Jack Daniels Gentleman" has a "700ML" variant priced at "$10.00" + When user adds "700ML" product variant to the wishlist + Then user should have "700ML" product variant in the wishlist + + @api + Scenario: Adding a product variant to wishlist with API as an authenticated user + Given there is a user "test@example.com" + And user "test@example.com" "sylius" is authenticated + And user has a wishlist + And the store has a product "Jack Daniels Gentleman" priced at "$10.00" + And the product "Jack Daniels Gentleman" has a "700ML" variant priced at "$10.00" + When user adds "700ML" product variant to the wishlist + Then user should have "700ML" product variant in the wishlist + + @api + Scenario: Anonymous user tries to add product variant to another user's wishlist with API + Given there is a user "test@example.com" + And user "test@example.com" "sylius" is authenticated + And the store has a product "Jack Daniels Gentleman" priced at "$10.00" + And the product "Jack Daniels Gentleman" has a "700ML" variant priced at "$10.00" + When user has a wishlist + And user is unauthenticated + Then user tries to add "700ML" product variant to the wishlist + + @api + Scenario: Authenticated user tries to add product to another user's wishlist with API + Given there is a user "test@example.com" + And user "test@example.com" "sylius" is authenticated + And the store has a product "Jack Daniels Gentleman" priced at "$10.00" + And the product "Jack Daniels Gentleman" has a "700ML" variant priced at "$10.00" + When user has a wishlist + And there is a user "test1@example.com" + And user "test1@example.com" "sylius" is authenticated + Then user tries to add "700ML" product variant to the wishlist diff --git a/features/adding_product_to_wishlist_on_multiple_channels.feature b/features/adding_product_to_wishlist_on_multiple_channels.feature index f04289e9..053009d4 100644 --- a/features/adding_product_to_wishlist_on_multiple_channels.feature +++ b/features/adding_product_to_wishlist_on_multiple_channels.feature @@ -1,4 +1,4 @@ -@wishlist +@wishlist @api_wishlist Feature: Adding a product to wishlist In order to compare or buy products later As a Visitor @@ -12,7 +12,7 @@ Feature: Adding a product to wishlist And all store products appear under a main taxonomy @ui - Scenario: Adding product to wishlist in the first channel checking wishlist on the second channel. + Scenario: Adding product to wishlist in the first channel checking wishlist on the second channel Given I change my current channel to "Web-EU" When I add "Leprechaun's Silver" product to my wishlist And I should be notified that the product has been successfully added to my wishlist @@ -65,3 +65,38 @@ Feature: Adding a product to wishlist And I go to the wishlist page And I should have one item in my wishlist + @api + Scenario: Adding product to wishlist with API in the first channel checking wishlist on the second channel + Given I am browsing channel "Web-EU" + And user has a wishlist + When user adds product "Leprechaun's Silver" to the wishlist in "Web-EU" + Then user should have product "Leprechaun's Silver" in the wishlist + Then I am browsing channel "Web-US" + And user has a wishlist in "Web-US" + Then user should have an empty wishlist in "Web-US" + + @api + Scenario: Adding product to wishlisht with API on both channels + Given I change my current channel to "Web-EU" + And user has a wishlist in "Web-EU" + When user adds product "Leprechaun's Silver" to the wishlist in "Web-EU" + Then user should have product "Leprechaun's Silver" in the wishlist + Then I change my current channel to "Web-US" + And user has a wishlist in "Web-US" + When user adds product "Leprechaun's Gold" to the wishlist in "Web-US" + Then user should have product "Leprechaun's Gold" in the wishlist + + @api + Scenario: Adding product to wishlist with API on both channels and removing from one channel + Given I change my current channel to "Web-EU" + And user has a wishlist in "Web-EU" + When user adds product "Leprechaun's Silver" to the wishlist in "Web-EU" + Then user should have product "Leprechaun's Silver" in the wishlist + Then I change my current channel to "Web-US" + And user has a wishlist in "Web-US" + When user adds product "Leprechaun's Gold" to the wishlist in "Web-US" + Then user should have product "Leprechaun's Gold" in the wishlist + Then user removes product "Leprechaun's Gold" from the wishlist + Then user should have an empty wishlist + And I change my current channel to "Web-EU" + Then user should have product "Leprechaun's Silver" in the wishlist on "Web-EU" diff --git a/features/adding_wishlist_product_to_cart.feature b/features/adding_wishlist_product_to_cart.feature index d511a1b8..a5ecf8ab 100644 --- a/features/adding_wishlist_product_to_cart.feature +++ b/features/adding_wishlist_product_to_cart.feature @@ -1,81 +1,81 @@ @wishlist Feature: Adding wishlist product to cart - In order to buy products I like - As a Visitor - I want to be able to add my wishlist product to my cart + In order to buy products I like + As a Visitor + I want to be able to add my wishlist product to my cart - Background: - Given the store operates on a single channel in "United States" + Background: + Given the store operates on a single channel in "United States" - @ui - Scenario: Adding a wishlist product to cart - Given the store has a product "Jack Daniels Gentleman" priced at "$10.00" - And all store products appear under a main taxonomy - And the store has a product "Bushmills Black Bush Whiskey" priced at "$230.00" - And there is 5 units of product "Bushmills Black Bush Whiskey" available in the inventory - And I have these products in my wishlist - When I go to the wishlist page - And I select 1 quantity of "Bushmills Black Bush Whiskey" product - And I add my wishlist products to cart - Then I should have "Bushmills Black Bush Whiskey" product in my cart + @ui + Scenario: Adding a wishlist product to cart + Given the store has a product "Jack Daniels Gentleman" priced at "$10.00" + And all store products appear under a main taxonomy + And the store has a product "Bushmills Black Bush Whiskey" priced at "$230.00" + And there is 5 units of product "Bushmills Black Bush Whiskey" available in the inventory + And I have these products in my wishlist + When I go to the wishlist page + And I select 1 quantity of "Bushmills Black Bush Whiskey" product + And I add my wishlist products to cart + Then I should have "Bushmills Black Bush Whiskey" product in my cart - @ui - Scenario: Adding a wishlist product with out of stock to cart - Given the store has a product "Jack Daniels Gentleman" priced at "$10.00" - And the product "Jack Daniels Gentleman" is out of stock - And I have this product in my wishlist - When I go to the wishlist page - And I select 1 quantity of "Jack Daniels Gentleman" product - And I add my wishlist products to cart - Then I should be notified that "Jack Daniels Gentleman" does not have sufficient stock + @ui + Scenario: Adding a wishlist product with out of stock to cart + Given the store has a product "Jack Daniels Gentleman" priced at "$10.00" + And the product "Jack Daniels Gentleman" is out of stock + And I have this product in my wishlist + When I go to the wishlist page + And I select 1 quantity of "Jack Daniels Gentleman" product + And I add my wishlist products to cart + Then I should be notified that "Jack Daniels Gentleman" does not have sufficient stock - @ui - Scenario: Adding selected wishlist products to cart - Given the store has a product "Jack Daniels Gentleman" priced at "$10.00" - And all store products appear under a main taxonomy - And the store has a product "Bushmills Black Bush Whiskey" priced at "$230.00" - And there is 5 units of product "Bushmills Black Bush Whiskey" available in the inventory - And I have these products in my wishlist - When I go to the wishlist page - And I select 1 quantity of "Bushmills Black Bush Whiskey" product - And I check "Bushmills Black Bush Whiskey" - And I add selected products to cart - Then I should have "Bushmills Black Bush Whiskey" product in my cart + @ui + Scenario: Adding selected wishlist products to cart + Given the store has a product "Jack Daniels Gentleman" priced at "$10.00" + And all store products appear under a main taxonomy + And the store has a product "Bushmills Black Bush Whiskey" priced at "$230.00" + And there is 5 units of product "Bushmills Black Bush Whiskey" available in the inventory + And I have these products in my wishlist + When I go to the wishlist page + And I select 1 quantity of "Bushmills Black Bush Whiskey" product + And I check "Bushmills Black Bush Whiskey" + And I add selected products to cart + Then I should have "Bushmills Black Bush Whiskey" product in my cart - @ui - Scenario: Adding selected wishlist products to cart with quantity 0 - Given the store has a product "Jack Daniels Gentleman" priced at "$10.00" - And all store products appear under a main taxonomy - And the store has a product "Bushmills Black Bush Whiskey" priced at "$230.00" - And there is 5 units of product "Bushmills Black Bush Whiskey" available in the inventory - And I have these products in my wishlist - When I go to the wishlist page - And I select 0 quantity of "Bushmills Black Bush Whiskey" product - And I check "Bushmills Black Bush Whiskey" - And I add selected products to cart - Then I should be notified that I should add more products + @ui + Scenario: Adding selected wishlist products to cart with quantity 0 + Given the store has a product "Jack Daniels Gentleman" priced at "$10.00" + And all store products appear under a main taxonomy + And the store has a product "Bushmills Black Bush Whiskey" priced at "$230.00" + And there is 5 units of product "Bushmills Black Bush Whiskey" available in the inventory + And I have these products in my wishlist + When I go to the wishlist page + And I select 0 quantity of "Bushmills Black Bush Whiskey" product + And I check "Bushmills Black Bush Whiskey" + And I add selected products to cart + Then I should be notified that I should add more products - @ui - Scenario: Adding a wishlist product with insufficient stock to cart - Given the store has a product "Jack Daniels Gentleman" priced at "$10.00" - And there is 3 units of product "Jack Daniels Gentleman" available in the inventory - And the "Jack Daniels Gentleman" product is tracked by the inventory - And I have this product in my wishlist - When I go to the wishlist page - And I select 4 quantity of "Jack Daniels Gentleman" product - And I add my wishlist products to cart - Then I should be notified that "Jack Daniels Gentleman" does not have sufficient stock + @ui + Scenario: Adding a wishlist product with insufficient stock to cart + Given the store has a product "Jack Daniels Gentleman" priced at "$10.00" + And there is 3 units of product "Jack Daniels Gentleman" available in the inventory + And the "Jack Daniels Gentleman" product is tracked by the inventory + And I have this product in my wishlist + When I go to the wishlist page + And I select 4 quantity of "Jack Daniels Gentleman" product + And I add my wishlist products to cart + Then I should be notified that "Jack Daniels Gentleman" does not have sufficient stock - @ui - Scenario: Adding more than available in stock wishlist products to cart - Given the store has a product "Jack Daniels Gentleman" priced at "$10.00" - And all store products appear under a main taxonomy - And the store has a product "Bushmills Black Bush Whiskey" priced at "$230.00" - And there is 1 units of product "Bushmills Black Bush Whiskey" available in the inventory - And the "Bushmills Black Bush Whiskey" product is tracked by the inventory - And I have these products in my wishlist - When I go to the wishlist page - And I select 6 quantity of "Bushmills Black Bush Whiskey" product - And I check "Bushmills Black Bush Whiskey" - And I add selected products to cart - Then I should be notified that "Bushmills Black Bush Whiskey" does not have sufficient stock + @ui + Scenario: Adding more than available in stock wishlist products to cart + Given the store has a product "Jack Daniels Gentleman" priced at "$10.00" + And all store products appear under a main taxonomy + And the store has a product "Bushmills Black Bush Whiskey" priced at "$230.00" + And there is 1 units of product "Bushmills Black Bush Whiskey" available in the inventory + And the "Bushmills Black Bush Whiskey" product is tracked by the inventory + And I have these products in my wishlist + When I go to the wishlist page + And I select 6 quantity of "Bushmills Black Bush Whiskey" product + And I check "Bushmills Black Bush Whiskey" + And I add selected products to cart + Then I should be notified that "Bushmills Black Bush Whiskey" does not have sufficient stock diff --git a/features/api/adding_product_to_wishlist.feature b/features/api/adding_product_to_wishlist.feature deleted file mode 100644 index da129f90..00000000 --- a/features/api/adding_product_to_wishlist.feature +++ /dev/null @@ -1,39 +0,0 @@ -@api_wishlist -Feature: Adding a product to wishlist - Background: - Given the store operates on a single channel in "United States" - - @api - Scenario: Adding a product to wishlist as an anonymous user - Given user has a wishlist - And the store has a product "Jack Daniels Gentleman" priced at "$10.00" - When user adds product "Jack Daniels Gentleman" to the wishlist - Then user should have product "Jack Daniels Gentleman" in the wishlist - - @api - Scenario: Adding a product to wishlist as an authenticated user - Given there is a user "test@example.com" - And user "test@example.com" "sylius" is authenticated - And the store has a product "Jack Daniels Gentleman" priced at "$10.00" - When user has a wishlist - And user adds product "Jack Daniels Gentleman" to the wishlist - Then user should have product "Jack Daniels Gentleman" in the wishlist - - @api - Scenario: Anonymous user tries to add product to another user's wishlist - Given there is a user "test@example.com" - And user "test@example.com" "sylius" is authenticated - And the store has a product "Jack Daniels Gentleman" priced at "$10.00" - When user has a wishlist - And user is unauthenticated - Then user tries to add product "Jack Daniels Gentleman" to the wishlist - - @api - Scenario: Authenticated user tries to add product to another user's wishlist - Given there is a user "test@example.com" - And user "test@example.com" "sylius" is authenticated - And the store has a product "Jack Daniels Gentleman" priced at "$10.00" - When user has a wishlist - And there is a user "test1@example.com" - And user "test1@example.com" "sylius" is authenticated - Then user tries to add product "Jack Daniels Gentleman" to the wishlist diff --git a/features/api/adding_product_to_wishlist_on_multiple_channels.feature b/features/api/adding_product_to_wishlist_on_multiple_channels.feature deleted file mode 100644 index c5cd193a..00000000 --- a/features/api/adding_product_to_wishlist_on_multiple_channels.feature +++ /dev/null @@ -1,49 +0,0 @@ -@api_wishlist -Feature: Adding a product to wishlist - In order to compare or buy products later - As a Visitor - I want to be able to add products to my wishlist on 2 different channels - - Background: - Given the store operates on a channel named "Web-US" in "USD" currency - And the store also operates on another channel named "Web-EU" in "EUR" currency - And the store has a product "Leprechaun's Gold" priced at "$100.00" available in channel "Web-US" and channel "Web-EU" - And the store has a product "Leprechaun's Silver" priced at "€10.00" in "Web-EU" channel - And all store products appear under a main taxonomy - - @api - Scenario: Adding product to wishlist in the first channel checking wishlist on the second channel. - Given I am browsing channel "Web-EU" - And user has a wishlist - When user adds product "Leprechaun's Silver" to the wishlist in "Web-EU" - Then user should have product "Leprechaun's Silver" in the wishlist - Then I am browsing channel "Web-US" - And user has a wishlist in "Web-US" - Then user should have an empty wishlist in "Web-US" - - - @api - Scenario: Adding product to wishlisht on both channels - Given I change my current channel to "Web-EU" - And user has a wishlist in "Web-EU" - When user adds product "Leprechaun's Silver" to the wishlist in "Web-EU" - Then user should have product "Leprechaun's Silver" in the wishlist - Then I change my current channel to "Web-US" - And user has a wishlist in "Web-US" - When user adds product "Leprechaun's Gold" to the wishlist in "Web-US" - Then user should have product "Leprechaun's Gold" in the wishlist - - @api - Scenario: Adding product to wishlist on both channels and removing from one channel. - Given I change my current channel to "Web-EU" - And user has a wishlist in "Web-EU" - When user adds product "Leprechaun's Silver" to the wishlist in "Web-EU" - Then user should have product "Leprechaun's Silver" in the wishlist - Then I change my current channel to "Web-US" - And user has a wishlist in "Web-US" - When user adds product "Leprechaun's Gold" to the wishlist in "Web-US" - Then user should have product "Leprechaun's Gold" in the wishlist - Then user removes product "Leprechaun's Gold" from the wishlist - Then user should have an empty wishlist - And I change my current channel to "Web-EU" - Then user should have product "Leprechaun's Silver" in the wishlist on "Web-EU" diff --git a/features/api/adding_product_variant_to_wishlist.feature b/features/api/adding_product_variant_to_wishlist.feature deleted file mode 100644 index 0619c099..00000000 --- a/features/api/adding_product_variant_to_wishlist.feature +++ /dev/null @@ -1,44 +0,0 @@ -@api_wishlist -Feature: Adding a product variant to wishlist - - Background: - Given the store operates on a single channel in "United States" - - @api - Scenario: Adding a product variant to wishlist as an anonymous user - Given user has a wishlist - And the store has a product "Jack Daniels Gentleman" priced at "$10.00" - And the product "Jack Daniels Gentleman" has a "700ML" variant priced at "$10.00" - When user adds "700ML" product variant to the wishlist - Then user should have "700ML" product variant in the wishlist - - @api - Scenario: Adding a product variant to wishlist as an authenticated user - Given there is a user "test@example.com" - And user "test@example.com" "sylius" is authenticated - And user has a wishlist - And the store has a product "Jack Daniels Gentleman" priced at "$10.00" - And the product "Jack Daniels Gentleman" has a "700ML" variant priced at "$10.00" - When user adds "700ML" product variant to the wishlist - Then user should have "700ML" product variant in the wishlist - - @api - Scenario: Anonymous user tries to add product variant to another user's wishlist - Given there is a user "test@example.com" - And user "test@example.com" "sylius" is authenticated - And the store has a product "Jack Daniels Gentleman" priced at "$10.00" - And the product "Jack Daniels Gentleman" has a "700ML" variant priced at "$10.00" - When user has a wishlist - And user is unauthenticated - Then user tries to add "700ML" product variant to the wishlist - - @api - Scenario: Authenticated user tries to add product to another user's wishlist - Given there is a user "test@example.com" - And user "test@example.com" "sylius" is authenticated - And the store has a product "Jack Daniels Gentleman" priced at "$10.00" - And the product "Jack Daniels Gentleman" has a "700ML" variant priced at "$10.00" - When user has a wishlist - And there is a user "test1@example.com" - And user "test1@example.com" "sylius" is authenticated - Then user tries to add "700ML" product variant to the wishlist diff --git a/features/api/removing_product_from_wishlist.feature b/features/api/removing_product_from_wishlist.feature deleted file mode 100644 index 57d3915a..00000000 --- a/features/api/removing_product_from_wishlist.feature +++ /dev/null @@ -1,41 +0,0 @@ -@api_wishlist -Feature: Removing product from the wishlist - Background: - Given the store operates on a single channel in "United States" - - @api - Scenario: Removing product from the wishlist as an anonymous user - Given user has a wishlist - And the store has a product "Jack Daniels Gentleman" priced at "$10.00" - When user adds product "Jack Daniels Gentleman" to the wishlist - And user removes product "Jack Daniels Gentleman" from the wishlist - Then user should have an empty wishlist - - @api - Scenario: Removing product from the wishlist as an authenticated user - Given there is a user "test@example.com" - And user "test@example.com" "sylius" is authenticated - Given user has a wishlist - And the store has a product "Jack Daniels Gentleman" priced at "$10.00" - When user adds product "Jack Daniels Gentleman" to the wishlist - And user removes product "Jack Daniels Gentleman" from the wishlist - Then user should have an empty wishlist - - @api - Scenario: Anonymous user tries to remove product from another user's wishlist - Given there is a user "test@example.com" - And user "test@example.com" "sylius" is authenticated - And the store has a product "Jack Daniels Gentleman" priced at "$10.00" - When user has a wishlist - And user is unauthenticated - Then user tries to remove product "Jack Daniels Gentleman" from the wishlist - - @api - Scenario: Authenticated user tries to remove product from another user's wishlist - Given there is a user "test@example.com" - And user "test@example.com" "sylius" is authenticated - And the store has a product "Jack Daniels Gentleman" priced at "$10.00" - When user has a wishlist - And there is a user "test1@example.com" - And user "test1@example.com" "sylius" is authenticated - Then user tries to remove product "Jack Daniels Gentleman" from the wishlist diff --git a/features/api/removing_product_variant_from_wishlist.feature b/features/api/removing_product_variant_from_wishlist.feature deleted file mode 100644 index 02abd93a..00000000 --- a/features/api/removing_product_variant_from_wishlist.feature +++ /dev/null @@ -1,24 +0,0 @@ -@api_wishlist -Feature: Removing product variant from wishlist - Background: - Given the store operates on a single channel in "United States" - - @api - Scenario: Removing product variant from wishlist as an anonymous user - Given user has a wishlist - And the store has a product "Jack Daniels Gentleman" priced at "$10.00" - And the product "Jack Daniels Gentleman" has a "700ML" variant priced at "$10.00" - When user adds "700ML" product variant to the wishlist - Then user removes "700ML" product variant from the wishlist - Then user should have an empty wishlist - - @api - Scenario: Removing a product variant from wishlist as an authenticated user - Given there is a user "test@example.com" - And user "test@example.com" "sylius" is authenticated - And user has a wishlist - And the store has a product "Jack Daniels Gentleman" priced at "$10.00" - And the product "Jack Daniels Gentleman" has a "700ML" variant priced at "$10.00" - When user adds "700ML" product variant to the wishlist - Then user removes "700ML" product variant from the wishlist - Then user should have an empty wishlist diff --git a/features/cleaning_wishlist.feature b/features/cleaning_wishlist.feature index eb3137f1..bca70e2d 100644 --- a/features/cleaning_wishlist.feature +++ b/features/cleaning_wishlist.feature @@ -9,14 +9,14 @@ Feature: Cleaning all wishlist @ui Scenario: Cleaning wishlist - Given the store has a product "Jimmy Beammy" priced at "$233.00" - And the store has a product "Ice ball" priced at "$144.00" - And all store products appear under a main taxonomy - And I add "Jimmy Beammy" product to my wishlist - And I add "Ice ball" product to my wishlist - When I go to the wishlist page - Then I should have 2 products in my wishlist - When I follow "Clear wishlist" - Then I should be notified that wishlist has been cleared - And I should have 0 products in my wishlist + Given the store has a product "Jimmy Beammy" priced at "$233.00" + And the store has a product "Ice ball" priced at "$144.00" + And all store products appear under a main taxonomy + And I add "Jimmy Beammy" product to my wishlist + And I add "Ice ball" product to my wishlist + When I go to the wishlist page + Then I should have 2 products in my wishlist + When I follow "Clear wishlist" + Then I should be notified that wishlist has been cleared + And I should have 0 products in my wishlist diff --git a/features/creating_new_wishlist.feature b/features/creating_new_wishlist.feature index 95255d78..e81a5a24 100644 --- a/features/creating_new_wishlist.feature +++ b/features/creating_new_wishlist.feature @@ -1,18 +1,18 @@ @wishlist Feature: Creating a new wishlist - In order to create new wishlist - As a visitor - I want to be able to create new wishlists + In order to create new wishlist + As a visitor + I want to be able to create new wishlists - Background: - Given the store operates on a single channel in "United States" - Given I am on "/" + Background: + Given the store operates on a single channel in "United States" + Given I am on "/" - @ui @javascript - Scenario: Creating a new wishlist - When I go to "/wishlists" - When I open modal to create new wishlist - And I set new wishlist name "WishlistName" - Then I save new wishlist modal - Then I should wait for one second - Then I should be on new wishlist "WishlistName" + @ui @javascript + Scenario: Creating a new wishlist + When I go to "/wishlists" + When I open modal to create new wishlist + And I set new wishlist name "WishlistName" + Then I save new wishlist modal + Then I should wait for one second + Then I should be on new wishlist "WishlistName" diff --git a/features/editing_name_of_wishlist.feature b/features/editing_name_of_wishlist.feature index f477aed5..9af4361b 100644 --- a/features/editing_name_of_wishlist.feature +++ b/features/editing_name_of_wishlist.feature @@ -1,20 +1,20 @@ @wishlist Feature: Editing wishlists name - In order to indicate what is inside wishlist - As a Visitor - I want to be able to edit wishlist name + In order to indicate what is inside wishlist + As a Visitor + I want to be able to edit wishlist name - Background: - Given the store operates on a single channel in "United States" - Given I am on "/" + Background: + Given the store operates on a single channel in "United States" + Given I am on "/" - @ui @javascript - Scenario: Editing wishlists name - And the store has a wishlist named "Wishlist1" - When I go to "/wishlists" - Then I should see "Wishlist1" - When I press "wishlist-edit-button-Wishlist1" - And I fill in "edit_wishlist_name" with "Wishlist2" - When I press "edit_wishlist_save" - Then I go to "/wishlists" - And I should see "Wishlist2" + @ui @javascript + Scenario: Editing wishlists name + And the store has a wishlist named "Wishlist1" + When I go to "/wishlists" + Then I should see "Wishlist1" + When I press "wishlist-edit-button-Wishlist1" + And I fill in "edit_wishlist_name" with "Wishlist2" + When I press "edit_wishlist_save" + Then I go to "/wishlists" + And I should see "Wishlist2" diff --git a/features/exporting_product_from_wishlist_to_pdf.feature b/features/exporting_product_from_wishlist_to_pdf.feature index b09b284f..0c213f0e 100644 --- a/features/exporting_product_from_wishlist_to_pdf.feature +++ b/features/exporting_product_from_wishlist_to_pdf.feature @@ -1,16 +1,16 @@ @wishlist Feature: Exporting a product from wishlist to pdf - In order to save products and buy later - As a Visitor - I want to be able to exporting products to pdf + In order to save products and buy later + As a Visitor + I want to be able to exporting products to pdf - Background: - Given the store operates on a single channel in "United States" + Background: + Given the store operates on a single channel in "United States" - @ui - Scenario: Exporting selected products from wishlist - Given the store has a product "Jack Daniels Gentleman" priced at "$10.00" - And I have this product in my wishlist - When I go to the wishlist page - Then I check "Jack Daniels Gentleman" - And I export to pdf selected products from wishlist and file is downloaded + @ui + Scenario: Exporting selected products from wishlist + Given the store has a product "Jack Daniels Gentleman" priced at "$10.00" + And I have this product in my wishlist + When I go to the wishlist page + Then I check "Jack Daniels Gentleman" + And I export to pdf selected products from wishlist and file is downloaded diff --git a/features/listing_wishlists.feature b/features/listing_wishlists.feature index b1063792..15da5b94 100644 --- a/features/listing_wishlists.feature +++ b/features/listing_wishlists.feature @@ -1,38 +1,38 @@ @wishlist Feature: Listing wishlists - In order list all available wishlists - As a Visitor - I want to be able to see list of my wishlists + In order list all available wishlists + As a Visitor + I want to be able to see list of my wishlists - Background: - Given the store operates on a single channel in "United States" + Background: + Given the store operates on a single channel in "United States" - @ui - Scenario: Listing wishlist - Given I am on "/" - And the store has a wishlist named "Wishlist1" - And the store has a wishlist named "Wishlist2" - When I go to "/wishlists" - Then I should have 2 wishlists + @ui + Scenario: Listing wishlist + Given I am on "/" + And the store has a wishlist named "Wishlist1" + And the store has a wishlist named "Wishlist2" + When I go to "/wishlists" + Then I should have 2 wishlists - @ui - Scenario: Listing wishlist as user - Given there is a customer account "jdeer@sylius.pl" - And I am logged in as "jdeer@sylius.pl" - And user "jdeer@sylius.pl" has a wishlist named "Wishlist1" with token "123456token" - And user "jdeer@sylius.pl" has a wishlist named "Wishlist2" with token "123456token" - When I go to "/wishlists" - Then I should have 2 wishlists + @ui + Scenario: Listing wishlist as user + Given there is a customer account "jdeer@sylius.pl" + And I am logged in as "jdeer@sylius.pl" + And user "jdeer@sylius.pl" has a wishlist named "Wishlist1" with token "123456token" + And user "jdeer@sylius.pl" has a wishlist named "Wishlist2" with token "123456token" + When I go to "/wishlists" + Then I should have 2 wishlists - @ui - Scenario: Listing wishlist as user on same computer as another user - Given there is a customer account "jdeer@sylius.pl" - And there is a customer account "user2@sylius.pl" - And user "jdeer@sylius.pl" has a wishlist named "Wishlist1" with token "123456token" - And user "jdeer@sylius.pl" has a wishlist named "Wishlist2" with token "123456token" - And user "user2@sylius.pl" has a wishlist named "Wishlist3" with token "123456token" - And user "user2@sylius.pl" has a wishlist named "Wishlist4" with token "123456token" - And user "user2@sylius.pl" has a wishlist named "Wishlist5" with token "123456token" - And I am logged in as "jdeer@sylius.pl" - When I go to "/wishlists" - Then I should have 2 wishlists + @ui + Scenario: Listing wishlist as user on same computer as another user + Given there is a customer account "jdeer@sylius.pl" + And there is a customer account "user2@sylius.pl" + And user "jdeer@sylius.pl" has a wishlist named "Wishlist1" with token "123456token" + And user "jdeer@sylius.pl" has a wishlist named "Wishlist2" with token "123456token" + And user "user2@sylius.pl" has a wishlist named "Wishlist3" with token "123456token" + And user "user2@sylius.pl" has a wishlist named "Wishlist4" with token "123456token" + And user "user2@sylius.pl" has a wishlist named "Wishlist5" with token "123456token" + And I am logged in as "jdeer@sylius.pl" + When I go to "/wishlists" + Then I should have 2 wishlists diff --git a/features/removing_product_from_wishlist.feature b/features/removing_product_from_wishlist.feature index e7ee7977..bf5158ed 100644 --- a/features/removing_product_from_wishlist.feature +++ b/features/removing_product_from_wishlist.feature @@ -1,26 +1,83 @@ -@wishlist +@wishlist @api_wishlist Feature: Removing a product from wishlist - In order to compare or buy products later - As a Visitor - I want to be able to remove products to my wishlist - - Background: - Given the store operates on a single channel in "United States" - - @ui - Scenario: Removing a product from wishlist - Given the store has a product "Jack Daniels Gentleman" priced at "$10.00" - And I have this product in my wishlist - When I go to the wishlist page - And I remove this product - Then I should be notified that the product has been removed from my wishlist - And I should have 0 products in my wishlist - - @ui - Scenario: Removing selected products from wishlist - Given the store has a product "Jack Daniels Gentleman" priced at "$10.00" - And I have this product in my wishlist - When I go to the wishlist page - Then I check "Jack Daniels Gentleman" - And I remove selected products from wishlist - And I should have 0 products in my wishlist + In order to compare or buy products later + As a Visitor + I want to be able to remove products to my wishlist + + Background: + Given the store operates on a single channel in "United States" + + @ui + Scenario: Removing a product from wishlist + Given the store has a product "Jack Daniels Gentleman" priced at "$10.00" + And I have this product in my wishlist + When I go to the wishlist page + And I remove this product + Then I should be notified that the product has been removed from my wishlist + And I should have 0 products in my wishlist + + @ui + Scenario: Removing selected products from wishlist + Given the store has a product "Jack Daniels Gentleman" priced at "$10.00" + And I have this product in my wishlist + When I go to the wishlist page + Then I check "Jack Daniels Gentleman" + And I remove selected products from wishlist + And I should have 0 products in my wishlist + + @api + Scenario: Removing product from the wishlist with API as an anonymous user + Given user has a wishlist + And the store has a product "Jack Daniels Gentleman" priced at "$10.00" + When user adds product "Jack Daniels Gentleman" to the wishlist + And user removes product "Jack Daniels Gentleman" from the wishlist + Then user should have an empty wishlist + + @api + Scenario: Removing product from the wishlist with API as an authenticated user + Given there is a user "test@example.com" + And user "test@example.com" "sylius" is authenticated + Given user has a wishlist + And the store has a product "Jack Daniels Gentleman" priced at "$10.00" + When user adds product "Jack Daniels Gentleman" to the wishlist + And user removes product "Jack Daniels Gentleman" from the wishlist + Then user should have an empty wishlist + + @api + Scenario: Anonymous user tries to remove product from another user's wishlist with API + Given there is a user "test@example.com" + And user "test@example.com" "sylius" is authenticated + And the store has a product "Jack Daniels Gentleman" priced at "$10.00" + When user has a wishlist + And user is unauthenticated + Then user tries to remove product "Jack Daniels Gentleman" from the wishlist + + @api + Scenario: Authenticated user tries to remove product from another user's wishlist with API + Given there is a user "test@example.com" + And user "test@example.com" "sylius" is authenticated + And the store has a product "Jack Daniels Gentleman" priced at "$10.00" + When user has a wishlist + And there is a user "test1@example.com" + And user "test1@example.com" "sylius" is authenticated + Then user tries to remove product "Jack Daniels Gentleman" from the wishlist + + @api + Scenario: Removing product variant from wishlist with API as an anonymous user + Given user has a wishlist + And the store has a product "Jack Daniels Gentleman" priced at "$10.00" + And the product "Jack Daniels Gentleman" has a "700ML" variant priced at "$10.00" + When user adds "700ML" product variant to the wishlist + Then user removes "700ML" product variant from the wishlist + Then user should have an empty wishlist + + @api + Scenario: Removing a product variant from wishlist with API as an authenticated user + Given there is a user "test@example.com" + And user "test@example.com" "sylius" is authenticated + And user has a wishlist + And the store has a product "Jack Daniels Gentleman" priced at "$10.00" + And the product "Jack Daniels Gentleman" has a "700ML" variant priced at "$10.00" + When user adds "700ML" product variant to the wishlist + Then user removes "700ML" product variant from the wishlist + Then user should have an empty wishlist diff --git a/features/removing_wishlist.feature b/features/removing_wishlist.feature index 4569c56a..ff5bdcb4 100644 --- a/features/removing_wishlist.feature +++ b/features/removing_wishlist.feature @@ -1,33 +1,33 @@ @wishlist Feature: Removing a wishlist - In order to remove redundant wishlists - As a Visitor - I want to be able to delete wishlist + In order to remove redundant wishlists + As a Visitor + I want to be able to delete wishlist - Background: - Given the store operates on a single channel in "United States" - Given I am on "/" + Background: + Given the store operates on a single channel in "United States" + Given I am on "/" - @ui @javascript - Scenario: Removing a wishlist - And the store has a wishlist named "Wishlist1" - And the store has a wishlist named "Wishlist2" - When I go to "/wishlists" - Then I should have 2 wishlists - When I press "wishlist-delete-button-Wishlist1" - When I press "remove_wishlist_save" - Then I should be on "/wishlists" - Then I should wait for one second - Then I should have 1 wishlists + @ui @javascript + Scenario: Removing a wishlist + And the store has a wishlist named "Wishlist1" + And the store has a wishlist named "Wishlist2" + When I go to "/wishlists" + Then I should have 2 wishlists + When I press "wishlist-delete-button-Wishlist1" + When I press "remove_wishlist_save" + Then I should be on "/wishlists" + Then I should wait for one second + Then I should have 1 wishlists - @ui @javascript - Scenario: Removing a wishlist with one existing - And the store has a wishlist named "Wishlist1" - When I go to "/wishlists" - Then I should have 1 wishlists - When I press "wishlist-delete-button-Wishlist1" - When I press "remove_wishlist_save" - Then I should be on "/wishlists" - Then I should wait for one second - Then I should have 0 wishlists + @ui @javascript + Scenario: Removing a wishlist with one existing + And the store has a wishlist named "Wishlist1" + When I go to "/wishlists" + Then I should have 1 wishlists + When I press "wishlist-delete-button-Wishlist1" + When I press "remove_wishlist_save" + Then I should be on "/wishlists" + Then I should wait for one second + Then I should have 0 wishlists diff --git a/features/showing_chosen_wishlist.feature b/features/showing_chosen_wishlist.feature index dea4e436..bd3cea98 100644 --- a/features/showing_chosen_wishlist.feature +++ b/features/showing_chosen_wishlist.feature @@ -1,22 +1,22 @@ @wishlist Feature: Showing chosen wishlist - In order to see products from chosen wishlist - As a Visitor - I want to be able to see chosen wishlist + In order to see products from chosen wishlist + As a Visitor + I want to be able to see chosen wishlist - Background: - Given the store operates on a single channel in "United States" - Given I am on "/" + Background: + Given the store operates on a single channel in "United States" + Given I am on "/" - @ui - Scenario: Showing chosen wishlist - And the store has a wishlist named "Wishlist1" - And the store has a wishlist named "Wishlist2" - And the store has a product "Jack Daniels Gentleman" priced at "$10.00" - And all store products appear under a main taxonomy - And I add "Jack Daniels Gentleman" to selected wishlist "Wishlist2" - Then I am on "/wishlists" - And I should have 2 wishlists - When I open "Wishlist2" - Then I should see "Wishlist2" - And I should have "Jack Daniels Gentleman" in selected wishlists "Wishlist2" + @ui + Scenario: Showing chosen wishlist + And the store has a wishlist named "Wishlist1" + And the store has a wishlist named "Wishlist2" + And the store has a product "Jack Daniels Gentleman" priced at "$10.00" + And all store products appear under a main taxonomy + And I add "Jack Daniels Gentleman" to selected wishlist "Wishlist2" + Then I am on "/wishlists" + And I should have 2 wishlists + When I open "Wishlist2" + Then I should see "Wishlist2" + And I should have "Jack Daniels Gentleman" in selected wishlists "Wishlist2"