From abf07c18d7516c54413022502a411752c7216c78 Mon Sep 17 00:00:00 2001 From: Mateusz Zalewski Date: Mon, 31 Oct 2016 13:30:18 +0100 Subject: [PATCH] [Behat][Product] Editing product slug scenarios --- .../editing_product_slug.feature | 71 +++++++++++++++++++ 1 file changed, 71 insertions(+) create mode 100644 features/product/managing_products/editing_product_slug.feature diff --git a/features/product/managing_products/editing_product_slug.feature b/features/product/managing_products/editing_product_slug.feature new file mode 100644 index 0000000000..d4ac841598 --- /dev/null +++ b/features/product/managing_products/editing_product_slug.feature @@ -0,0 +1,71 @@ +@managing_products +Feature: Editing product's slug + In order to manage access path to product page + As an Administrator + I want to be able to edit product's slug + + Background: + Given the store is available in "English (United States)" + And I am logged in as an administrator + + @ui @todo @javascript + Scenario: Creating product with autogenerated slug + Given I want to create a new simple product + When I specify its code as "BOARD_MANSION_OF_MADNESS" + And I name it "Mansion of Madness" in "English (United States)" + And I set its price to "$100.00" + And I add it + Then I should be notified that it has been successfully created + And the product "Mansion of Madness" should appear in the shop + And its slug should be "mansion-of-madness" + + @ui @todo @javascript + Scenario: Creating product with custom slug + Given I want to create a new simple product + When I specify its code as "BOARD_MANSION_OF_MADNESS" + And I name it "Mansion of Madness" in "English (United States)" + And I set its price to "$100.00" + And I set its slug to "mom-board-game" + And I add it + Then I should be notified that it has been successfully created + And the product "Mansion of Madness" should appear in the shop + And its slug should be "mom-board-game" + + @ui @todo + Scenario: Seeing disabled slug field when editing product + Given the store has a product "Mansion of Madness" + When I want to modify the this product + Then the slug field should be disabled + + @ui @todo @javascript + Scenario: Prevent from editing slug while changing product name + Given the store has a product "Mansion of Madness" + When I want to modify this product + And I rename it to "Mansion of Madness: Second Edition" 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 "Mansion of Madness: Second Edition" + And its slug should still be "mansion-of-madness" + + @ui @todo @javascript + Scenario: Automatically changing product's slug while editing product's name + Given the store has a product "Mansion of Madness" + When I want to modify this product + And I enable slug modification + And I rename it to "Small World" 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 "Small World" + And its slug should still be "small-world" + + @ui @todo @javascript + Scenario: Manually changing product's slug while editing product's name + Given the store has a product "Mansion of Madness" + When I want to modify this product + And I enable slug modification + And I rename it to "Small World" in "English (United States)" + And I set its slug to "small-world-board-game" + And I save my changes + Then I should be notified that it has been successfully edited + And this product name should be "Small World" + And its slug should still be "small-world-board-game"