From c845cd6b896309d472b916d4960f9cc029d7350c Mon Sep 17 00:00:00 2001 From: Jan Goralski Date: Wed, 29 Mar 2023 10:50:54 +0200 Subject: [PATCH] [PriceHistory][Behat] Update channel edition scenarios --- ...set_period_of_showing_lowest_price.feature | 37 +++++++++++++++++-- ...annel_with_toggle_for_lowest_price.feature | 20 +++++++++- ...owest_price_of_discounted_products.feature | 22 +++++++++-- 3 files changed, 70 insertions(+), 9 deletions(-) diff --git a/features/channel/managing_channels/editing_channel_with_set_period_of_showing_lowest_price.feature b/features/channel/managing_channels/editing_channel_with_set_period_of_showing_lowest_price.feature index d2c3c11b37..0e895a2f45 100644 --- a/features/channel/managing_channels/editing_channel_with_set_period_of_showing_lowest_price.feature +++ b/features/channel/managing_channels/editing_channel_with_set_period_of_showing_lowest_price.feature @@ -9,7 +9,7 @@ Feature: Specifying the lowest price for discounted products checking period whi And this channel has 15 days set as the lowest price for discounted products checking period And I am logged in as an administrator - @api @ui + @no-api @ui Scenario: Changing the lowest price for discounted products checking period When I want to modify a channel "EU" And I specify 30 days as the lowest price for discounted products checking period @@ -17,23 +17,52 @@ Feature: Specifying the lowest price for discounted products checking period whi Then I should be notified that it has been successfully edited And its lowest price for discounted products checking period should be set to 30 days - @api @ui + @no-api @ui Scenario: Being prevented from changing the lowest price for discounted products checking period to zero When I want to modify a channel "EU" And I specify 0 days as the lowest price for discounted products checking period And I try to save my changes Then I should be notified that the lowest price for discounted products checking period must be greater than 0 - @api @ui + @no-api @ui Scenario: Being prevented from changing the lowest price for discounted products checking period to a negative value When I want to modify a channel "EU" And I specify -10 days as the lowest price for discounted products checking period And I try to save my changes Then I should be notified that the lowest price for discounted products checking period must be greater than 0 - @api @ui + @no-api @ui Scenario: Being prevented from changing the lowest price for discounted products checking period to a too big value When I want to modify a channel "EU" And I specify 99999999999 days as the lowest price for discounted products checking period And I try to save my changes Then I should be notified that the lowest price for discounted products checking period must be lower + + @api @no-ui + Scenario: Changing the lowest price for discounted products checking period + When I want to modify the price history config of channel "EU" + And I change the lowest price for discounted products checking period to 30 days + And I save my changes + Then I should be notified that it has been successfully edited + And its lowest price for discounted products checking period should be set to 30 days + + @api @no-ui + Scenario: Being prevented from changing the lowest price for discounted products checking period to zero + When I want to modify the price history config of channel "EU" + And I change the lowest price for discounted products checking period to 0 days + And I try to save my changes + Then I should be notified that the lowest price for discounted products checking period must be greater than 0 + + @api @no-ui + Scenario: Being prevented from changing the lowest price for discounted products checking period to a negative value + When I want to modify the price history config of channel "EU" + And I change the lowest price for discounted products checking period to -10 days + And I try to save my changes + Then I should be notified that the lowest price for discounted products checking period must be greater than 0 + + @api @no-ui + Scenario: Being prevented from changing the lowest price for discounted products checking period to a too big value + When I want to modify the price history config of channel "EU" + And I change the lowest price for discounted products checking period to 99999999999 days + And I try to save my changes + Then I should be notified that the lowest price for discounted products checking period must be lower diff --git a/features/channel/managing_channels/editing_channel_with_toggle_for_lowest_price.feature b/features/channel/managing_channels/editing_channel_with_toggle_for_lowest_price.feature index 81a6aaf969..e24f38ca61 100644 --- a/features/channel/managing_channels/editing_channel_with_toggle_for_lowest_price.feature +++ b/features/channel/managing_channels/editing_channel_with_toggle_for_lowest_price.feature @@ -11,7 +11,7 @@ Feature: Choosing whether to show the lowest product price or not while editing And the channel "US Channel" has showing the lowest price of discounted products disabled And I am logged in as an administrator - @api @ui + @no-api @ui Scenario: Enabling showing the lowest price of discounted products on a channel When I want to modify a channel "US Channel" And I enable showing the lowest price of discounted products @@ -19,10 +19,26 @@ Feature: Choosing whether to show the lowest product price or not while editing Then I should be notified that it has been successfully edited And the "US Channel" channel should have the lowest price of discounted products prior to the current discount enabled - @api @ui + @no-api @ui Scenario: Disabling showing the lowest price of discounted products on a channel When I want to modify a channel "EU Channel" And I disable showing the lowest price of discounted products And I save my changes Then I should be notified that it has been successfully edited And the "EU Channel" channel should have the lowest price of discounted products prior to the current discount disabled + + @api @no-ui + Scenario: Enabling showing the lowest price of discounted products on a channel + When I want to modify the price history config of channel "US Channel" + And I change showing of the lowest price of discounted products to be enabled + And I save my changes + Then I should be notified that it has been successfully edited + And the "US Channel" channel should have the lowest price of discounted products prior to the current discount enabled + + @api @no-ui + Scenario: Disabling showing the lowest price of discounted products on a channel + When I want to modify the price history config of channel "EU Channel" + And I change showing of the lowest price of discounted products to be disabled + And I save my changes + Then I should be notified that it has been successfully edited + And the "EU Channel" channel should have the lowest price of discounted products prior to the current discount disabled diff --git a/features/channel/managing_channels/excluding_chosen_taxons_from_showing_lowest_price_of_discounted_products.feature b/features/channel/managing_channels/excluding_chosen_taxons_from_showing_lowest_price_of_discounted_products.feature index c64d8a565d..ddfd8321a9 100644 --- a/features/channel/managing_channels/excluding_chosen_taxons_from_showing_lowest_price_of_discounted_products.feature +++ b/features/channel/managing_channels/excluding_chosen_taxons_from_showing_lowest_price_of_discounted_products.feature @@ -9,7 +9,7 @@ Feature: Excluding chosen taxons from displaying the lowest price of discounted And the store classifies its products as "T-Shirts", "Caps" and "Sweaters" And I am logged in as an administrator - @api @ui @javascript + @no-api @ui @javascript Scenario: Excluding a singular taxon from displaying the lowest price of discounted products When I want to modify a channel "Poland" And I exclude the "T-Shirts" taxon from showing the lowest price of discounted products @@ -17,7 +17,7 @@ Feature: Excluding chosen taxons from displaying the lowest price of discounted Then I should be notified that it has been successfully edited And this channel should have "T-Shirts" taxon excluded from displaying the lowest price of discounted products - @api @ui @javascript + @no-api @ui @javascript Scenario: Excluding multiple taxons from displaying the lowest price of discounted products When I want to modify a channel "Poland" And I exclude the "T-Shirts" and "Caps" taxons from showing the lowest price of discounted products @@ -25,7 +25,7 @@ Feature: Excluding chosen taxons from displaying the lowest price of discounted Then I should be notified that it has been successfully edited And this channel should have "T-Shirts" and "Caps" taxons excluded from displaying the lowest price of discounted products - @ui @javascript @no-api + @no-api @ui @javascript Scenario: Removing excluded taxon from displaying the lowest price of discounted products Given the channel "Poland" has "T-Shirts" and "Caps" taxons excluded from showing the lowest price of discounted products When I want to modify this channel @@ -34,3 +34,19 @@ Feature: Excluding chosen taxons from displaying the lowest price of discounted Then I should be notified that it has been successfully edited And this channel should have "Caps" taxon excluded from displaying the lowest price of discounted products And this channel should not have "T-Shirts" taxon excluded from displaying the lowest price of discounted products + + @api @no-ui + Scenario: Excluding a singular taxon from displaying the lowest price of discounted products + When I want to modify the price history config of channel "Poland" + And I exclude the "T-Shirts" taxon from showing the lowest price of discounted products + And I save my changes + Then I should be notified that it has been successfully edited + And this channel should have "T-Shirts" taxon excluded from displaying the lowest price of discounted products + + @api @no-ui + Scenario: Excluding multiple taxons from displaying the lowest price of discounted products + When I want to modify the price history config of channel "Poland" + And I exclude the "T-Shirts" and "Caps" taxons from showing the lowest price of discounted products + And I save my changes + Then I should be notified that it has been successfully edited + And this channel should have "T-Shirts" and "Caps" taxons excluded from displaying the lowest price of discounted products