From 62875a04bf67d266583d956ffda38144fd417dd4 Mon Sep 17 00:00:00 2001 From: Jan Goralski Date: Fri, 13 Jan 2017 13:53:49 +0100 Subject: [PATCH] [Behat] Scenarios for archiving shipping methods --- ...vailable_shipping_method_selection.feature | 10 ++++++ .../archiving_shipping_methods.feature | 36 +++++++++++++++++++ 2 files changed, 46 insertions(+) create mode 100644 features/shipping/managing_shipping_methods/archiving_shipping_methods.feature diff --git a/features/checkout/shipping_order/preventing_not_available_shipping_method_selection.feature b/features/checkout/shipping_order/preventing_not_available_shipping_method_selection.feature index ce098c030e..56b2823778 100644 --- a/features/checkout/shipping_order/preventing_not_available_shipping_method_selection.feature +++ b/features/checkout/shipping_order/preventing_not_available_shipping_method_selection.feature @@ -52,3 +52,13 @@ Feature: Preventing not available shipping method selection Then I should not be able to select "Raven Post" shipping method And I should not be able to select "Dragon Post" shipping method And I should be informed that my order cannot be shipped to this address + + @ui + Scenario: Not being able to select an archival shipping method + Given the store has "Raven Post" shipping method with "$10.00" fee + And the store has an archival "Dragon Post" shipping method with "$30.00" fee + And I have product "Targaryen T-Shirt" in the cart + When I am at the checkout addressing step + And I specify the shipping address as "Ankh Morpork", "Frost Alley", "90210", "United States" for "Jon Snow" + And I complete the addressing step + Then I should not be able to select "Dragon Post" shipping method diff --git a/features/shipping/managing_shipping_methods/archiving_shipping_methods.feature b/features/shipping/managing_shipping_methods/archiving_shipping_methods.feature new file mode 100644 index 0000000000..88bd250c1a --- /dev/null +++ b/features/shipping/managing_shipping_methods/archiving_shipping_methods.feature @@ -0,0 +1,36 @@ +@managing_shipping_methods +Feature: Archiving obsolete shipping methods + In order to hide no longer available shipping methods from the list and customers' use + As an Administrator + I want to archive shipping methods + + Background: + Given the store operates on a single channel in "United States" + And the store allows shipping with "UPS Carrier" and "FedEx Carrier" + And I am logged in as an administrator + + @ui + Scenario: Archiving a shipping method + Given I am browsing shipping methods + When I archive the "UPS Carrier" shipping method + Then the only shipping method on the list should be "FedEx Carrier" + + @domain + Scenario: Archiving a shipping method does not remove it from the database + When I archive the "UPS Carrier" shipping method + Then the shipping method "UPS Carrier" should still exist in the registry + + @ui + Scenario: Seeing only archived shipping methods + Given the shipping method "UPS Carrier" is archival + And I am browsing shipping methods + When I filter archival shipping methods + Then the only shipping method on the list should be "UPS Carrier" + + @ui + Scenario: Restoring an archival shipping method + Given the shipping method "UPS Carrier" is archival + And I am browsing archival shipping methods + When I restore the "UPS Carrier" shipping method + Then I should be viewing non archival shipping methods + And I should see 2 shipping methods on the list