mirror of
https://github.com/Sylius/Sylius.git
synced 2026-07-14 09:02:12 +00:00
[Behat] Modified scenarios due to translation changes
This commit is contained in:
parent
c7e3d83e97
commit
82cb41d934
43 changed files with 375 additions and 364 deletions
|
|
@ -400,6 +400,7 @@ default:
|
|||
extensions:
|
||||
Lakion\Behat\MinkDebugExtension:
|
||||
directory: etc/build
|
||||
clean_start: false
|
||||
Behat\MinkExtension:
|
||||
sessions:
|
||||
default:
|
||||
|
|
|
|||
|
|
@ -47,7 +47,7 @@ Feature: Countries and provinces
|
|||
When I select "Poland" from "Name"
|
||||
And I press "Create"
|
||||
Then I should be on the page of country "Poland"
|
||||
And I should see "Country has been successfully created."
|
||||
And I should see "Country has been successfully created"
|
||||
|
||||
Scenario: Listing only available countries during creating a new country
|
||||
Given there is a disabled country "Germany"
|
||||
|
|
@ -64,7 +64,7 @@ Feature: Countries and provinces
|
|||
And I fill in the 1st province with "Lubusz"
|
||||
And I fill in the 2nd province with "Łódź"
|
||||
And I press "Create"
|
||||
Then I should see "Country has been successfully created."
|
||||
Then I should see "Country has been successfully created"
|
||||
And "Łódź" should appear on the page
|
||||
And "Lubusz" should appear on the page
|
||||
|
||||
|
|
@ -74,8 +74,8 @@ Feature: Countries and provinces
|
|||
When I click "Add province"
|
||||
And I fill in the 5th province with "Lyon"
|
||||
And I press "Save changes"
|
||||
Then I should see "Province name must be unique."
|
||||
And I should see "Province code must be unique."
|
||||
Then I should see "Province name must be unique"
|
||||
And I should see "Province code must be unique"
|
||||
|
||||
Scenario: Created countries appear in the list
|
||||
Given I created country "Poland"
|
||||
|
|
@ -85,12 +85,12 @@ Feature: Countries and provinces
|
|||
|
||||
Scenario: Accessing the country editing form
|
||||
Given I am on the page of country "France"
|
||||
When I follow "edit"
|
||||
When I follow "Edit"
|
||||
Then I should be editing country "France"
|
||||
|
||||
Scenario: Accessing the editing form from the list
|
||||
Given I am on the country index page
|
||||
When I click "edit" near "China"
|
||||
When I click "Edit" near "China"
|
||||
Then I should be editing country "China"
|
||||
|
||||
Scenario: Cannot edit country code
|
||||
|
|
|
|||
|
|
@ -26,13 +26,13 @@ Feature: General settings
|
|||
When I fill in "Page title" with ""
|
||||
And I press "Save changes"
|
||||
Then I should still be on the general settings page
|
||||
And I should see "This value should not be blank."
|
||||
And I should see "This value should not be blank"
|
||||
|
||||
Scenario: Saving the configuration
|
||||
Given I am on the general settings page
|
||||
When I press "Save changes"
|
||||
Then I should still be on the general settings page
|
||||
And I should see "Settings have been successfully updated."
|
||||
And I should see "Settings have been successfully updated"
|
||||
|
||||
Scenario: Editing the page title
|
||||
Given I am on the general settings page
|
||||
|
|
@ -40,7 +40,7 @@ Feature: General settings
|
|||
And I press "Save changes"
|
||||
Then I should still be on the general settings page
|
||||
And the "Page title" field should contain "SuperStore.com - SALE!"
|
||||
And I should see "Settings have been successfully updated."
|
||||
And I should see "Settings have been successfully updated"
|
||||
|
||||
Scenario: Frontend store title changes after settings update
|
||||
Given I am on the general settings page
|
||||
|
|
@ -51,11 +51,11 @@ Feature: General settings
|
|||
|
||||
Scenario: Editing the meta description
|
||||
Given I am on the general settings page
|
||||
When I fill in "Meta description" with "Best fashion store on the web."
|
||||
When I fill in "Meta description" with "Best fashion store on the web"
|
||||
And I press "Save changes"
|
||||
Then I should still be on the general settings page
|
||||
And the "Meta description" field should contain "Best fashion store on the web."
|
||||
And I should see "Settings have been successfully updated."
|
||||
And the "Meta description" field should contain "Best fashion store on the web"
|
||||
And I should see "Settings have been successfully updated"
|
||||
|
||||
Scenario: Editing the meta keywords
|
||||
Given I am on the general settings page
|
||||
|
|
@ -63,7 +63,7 @@ Feature: General settings
|
|||
And I press "Save changes"
|
||||
Then I should still be on the general settings page
|
||||
And the "Meta keywords" field should contain "clothing, fashion, trends"
|
||||
And I should see "Settings have been successfully updated."
|
||||
And I should see "Settings have been successfully updated"
|
||||
|
||||
Scenario: Changing default currency
|
||||
Given I am on the general settings page
|
||||
|
|
@ -71,7 +71,7 @@ Feature: General settings
|
|||
And I press "Save changes"
|
||||
Then I should still be on the general settings page
|
||||
And the "Default currency" field should contain "USD"
|
||||
And I should see "Settings have been successfully updated."
|
||||
And I should see "Settings have been successfully updated"
|
||||
|
||||
# Scenario: Changing language
|
||||
# Given I am on the general settings page
|
||||
|
|
|
|||
|
|
@ -40,7 +40,7 @@ Feature: Customer groups management
|
|||
Given I am on the group creation page
|
||||
When I press "Create"
|
||||
Then I should still be on the group creation page
|
||||
And I should see "Please enter group name."
|
||||
And I should see "Please enter group name"
|
||||
|
||||
Scenario: Creating group
|
||||
Given I am on the group creation page
|
||||
|
|
@ -55,11 +55,11 @@ Feature: Customer groups management
|
|||
When I select "Retail Customers" from "Groups"
|
||||
And I press "Save changes"
|
||||
Then I should be on the page of customer with email "rick@example.com"
|
||||
And "Customer has been successfully updated." should appear on the page
|
||||
And "Customer has been successfully updated" should appear on the page
|
||||
|
||||
Scenario: Accessing the editing form from the list
|
||||
Given I am on the group index page
|
||||
When I click "edit" near "Retail Customers"
|
||||
When I click "Edit" near "Retail Customers"
|
||||
Then I should be editing group with name "Retail Customers"
|
||||
|
||||
Scenario: Updating the group
|
||||
|
|
@ -67,15 +67,15 @@ Feature: Customer groups management
|
|||
When I fill in "Name" with "Premium Customers"
|
||||
And I press "Save changes"
|
||||
Then I should be on the group index page
|
||||
And "Group has been successfully updated." should appear on the page
|
||||
And "Group has been successfully updated" should appear on the page
|
||||
And "Premium Customers" should appear on the page
|
||||
But I should not see "Wholesale Customers"
|
||||
|
||||
@javascript
|
||||
Scenario: Deleting group
|
||||
Given I am on the group index page
|
||||
When I click "delete" near "Wholesale Customers"
|
||||
And I click "delete" from the confirmation modal
|
||||
When I click "Delete" near "Wholesale Customers"
|
||||
And I click "Delete" from the confirmation modal
|
||||
Then I should still be on the group index page
|
||||
And I should see "Group has been successfully deleted."
|
||||
And I should see "Group has been successfully deleted"
|
||||
And I should not see group with name "Wholesale Customers" in that list
|
||||
|
|
|
|||
|
|
@ -27,36 +27,36 @@ Feature: Inventory tracking
|
|||
Scenario: Seeing empty index of inventory
|
||||
Given there are no products
|
||||
When I am on the inventory index page
|
||||
Then I should see "There are no products to display."
|
||||
Then I should see "There are no products to display"
|
||||
|
||||
Scenario: Updating product stock level
|
||||
Given I am editing product "Sticker"
|
||||
When I fill in "Current stock" with "10"
|
||||
And I press "Save changes"
|
||||
Then I should be on the page of product "Sticker"
|
||||
And I should see "Product has been successfully updated."
|
||||
And I should see "Product has been successfully updated"
|
||||
|
||||
Scenario: Making product not available on demand
|
||||
Given I am editing product "Sticker"
|
||||
When I uncheck "Available on demand"
|
||||
And I press "Save changes"
|
||||
Then I should be on the page of product "Sticker"
|
||||
And I should see "Product has been successfully updated."
|
||||
And I should see "Product has been successfully updated"
|
||||
|
||||
Scenario: Updating variant stock level
|
||||
Given product "Black T-Shirt" is available in all variations
|
||||
And I am on the page of product "Black T-Shirt"
|
||||
When I click "edit" near "Size: L"
|
||||
When I click "Edit" near "Size: L"
|
||||
And I fill in "Current stock" with "10"
|
||||
And I press "Save changes"
|
||||
Then I should be on the page of product "Black T-Shirt"
|
||||
And I should see "Variant has been successfully updated."
|
||||
And I should see "Variant has been successfully updated"
|
||||
|
||||
Scenario: Making variant not available on demand
|
||||
Given product "Black T-Shirt" is available in all variations
|
||||
And I am on the page of product "Black T-Shirt"
|
||||
When I click "edit" near "Size: L"
|
||||
When I click "Edit" near "Size: L"
|
||||
And I uncheck "Available on demand"
|
||||
And I press "Save changes"
|
||||
Then I should be on the page of product "Black T-Shirt"
|
||||
And I should see "Variant has been successfully updated."
|
||||
And I should see "Variant has been successfully updated"
|
||||
|
|
|
|||
|
|
@ -57,42 +57,42 @@ Feature: Orders management
|
|||
|
||||
Scenario: Accessing the order editing form
|
||||
Given I am viewing order with number "000000001"
|
||||
When I follow "edit"
|
||||
When I follow "Edit"
|
||||
Then I should be editing order with number "000000001"
|
||||
|
||||
Scenario: Accessing the editing form from the list
|
||||
Given I am on the order index page
|
||||
When I click "edit" near "#000000002"
|
||||
When I click "Edit" near "#000000002"
|
||||
Then I should be editing order with number "000000002"
|
||||
|
||||
@javascript
|
||||
Scenario: Deleting the order
|
||||
Given I am viewing order with number "000000001"
|
||||
When I press "delete"
|
||||
And I click "delete" from the confirmation modal
|
||||
When I press "Delete"
|
||||
And I click "Delete" from the confirmation modal
|
||||
Then I should be on the order index page
|
||||
And I should see "Order has been successfully deleted."
|
||||
And I should see "Order has been successfully deleted"
|
||||
And I should not see order with number "#000000001" in the list
|
||||
|
||||
@javascript
|
||||
Scenario: Deleting the order via list
|
||||
Given I am on the order index page
|
||||
When I press "delete" near "#000000001"
|
||||
And I click "delete" from the confirmation modal
|
||||
When I press "Delete" near "#000000001"
|
||||
And I click "Delete" from the confirmation modal
|
||||
Then I should be on the order index page
|
||||
And I should see "Order has been successfully deleted."
|
||||
And I should see "Order has been successfully deleted"
|
||||
|
||||
Scenario: Order integrity is preserved after deleting a product
|
||||
Given I have deleted the product "Mug"
|
||||
And I go to the order index page
|
||||
When I click "details" near "#000000001"
|
||||
When I click "Details" near "#000000001"
|
||||
Then I should be viewing order with number "000000001"
|
||||
And I should see "Mug"
|
||||
And I should see "Total: €14.74"
|
||||
|
||||
Scenario: Accessing the order details page from list
|
||||
Given I am on the order index page
|
||||
When I click "details" near "#000000001"
|
||||
When I click "Details" near "#000000001"
|
||||
Then I should be viewing order with number "000000001"
|
||||
|
||||
Scenario: Accessing the order details page by clicking the number
|
||||
|
|
@ -112,7 +112,7 @@ Feature: Orders management
|
|||
Given I am viewing order with number "000000002"
|
||||
Then I should see "Tax total: €10.58"
|
||||
|
||||
Scenario: Sorting order table by appropriate column
|
||||
Scenario: Sorting order list by appropriate column
|
||||
Given I am on the order index page
|
||||
When I follow "customer"
|
||||
Then I should see table of orders sorted by lastName
|
||||
When I follow "Customer"
|
||||
Then I should see the orders list sorted by customers' last names
|
||||
|
|
|
|||
|
|
@ -33,8 +33,8 @@ Feature: Payment methods
|
|||
Given I am on the payment method creation page
|
||||
When I press "Create"
|
||||
Then I should still be on the payment method creation page
|
||||
And I should see "Please enter payment method name."
|
||||
And I should see "Please enter payment method code."
|
||||
And I should see "Please enter payment method name"
|
||||
And I should see "Please enter payment method code"
|
||||
|
||||
Scenario: Creating new payment method with flexible rate
|
||||
Given I am on the payment method creation page
|
||||
|
|
@ -43,7 +43,7 @@ Feature: Payment methods
|
|||
And I fill in "Amount" with "10"
|
||||
And I press "Create"
|
||||
Then I should be on the payment method index page
|
||||
And I should see "Payment method has been successfully created."
|
||||
And I should see "Payment method has been successfully created"
|
||||
|
||||
Scenario: Describing the payment method
|
||||
Given I am on the payment method creation page
|
||||
|
|
@ -53,7 +53,7 @@ Feature: Payment methods
|
|||
And I fill in "Amount" with "10"
|
||||
And I press "Create"
|
||||
Then I should be on the payment method index page
|
||||
And I should see "Payment method has been successfully created."
|
||||
And I should see "Payment method has been successfully created"
|
||||
|
||||
Scenario: Created methods appear in the list
|
||||
Given I am on the payment method creation page
|
||||
|
|
@ -66,7 +66,7 @@ Feature: Payment methods
|
|||
|
||||
Scenario: Accessing the editing form from the list
|
||||
Given I am on the payment method index page
|
||||
When I click "edit" near "PayPal"
|
||||
When I click "Edit" near "PayPal"
|
||||
Then I should be editing payment method "PayPal"
|
||||
|
||||
Scenario: Updating the payment method
|
||||
|
|
@ -83,7 +83,7 @@ Feature: Payment methods
|
|||
And I leave "%" empty
|
||||
And I press "Save changes"
|
||||
Then I should be editing payment method "PayPal"
|
||||
And I should see "Please enter the fee percent."
|
||||
And I should see "Please enter the fee percent"
|
||||
|
||||
Scenario: Submitting invalid form with negative percent
|
||||
Given I am editing payment method "PayPal"
|
||||
|
|
@ -91,7 +91,7 @@ Feature: Payment methods
|
|||
And I fill in "%" with "-1"
|
||||
And I press "Save changes"
|
||||
Then I should be editing payment method "PayPal"
|
||||
And I should see "Percent fee cannot be lower than 0."
|
||||
And I should see "Percent fee cannot be lower than 0"
|
||||
|
||||
Scenario: Submitting invalid form with percent over 100
|
||||
Given I am editing payment method "PayPal"
|
||||
|
|
@ -99,7 +99,7 @@ Feature: Payment methods
|
|||
And I fill in "%" with "120"
|
||||
And I press "Save changes"
|
||||
Then I should be editing payment method "PayPal"
|
||||
And I should see "Percent fee cannot be greater than 100."
|
||||
And I should see "Percent fee cannot be greater than 100"
|
||||
|
||||
Scenario: Submitting invalid form without amount
|
||||
Given I am editing payment method "Credit Card"
|
||||
|
|
@ -107,7 +107,7 @@ Feature: Payment methods
|
|||
And I leave "Amount" empty
|
||||
And I press "Save changes"
|
||||
Then I should be editing payment method "Credit Card"
|
||||
And I should see "Please enter the fee amount."
|
||||
And I should see "Please enter the fee amount"
|
||||
|
||||
Scenario: Submitting invalid form with negative amount
|
||||
Given I am editing payment method "Credit Card"
|
||||
|
|
@ -115,21 +115,21 @@ Feature: Payment methods
|
|||
And I fill in "Amount" with "-1"
|
||||
And I press "Save changes"
|
||||
Then I should be editing payment method "Credit Card"
|
||||
And I should see "The fee cannot be lower than 0."
|
||||
And I should see "The fee cannot be lower than 0"
|
||||
|
||||
@javascript
|
||||
Scenario: Deleting payment method
|
||||
Given I am on the payment method index page
|
||||
When I click "delete" near "PayPal"
|
||||
And I click "delete" from the confirmation modal
|
||||
When I click "Delete" near "PayPal"
|
||||
And I click "Delete" from the confirmation modal
|
||||
Then I should still be on the payment method index page
|
||||
And I should see "Payment method has been successfully deleted."
|
||||
And I should see "Payment method has been successfully deleted"
|
||||
|
||||
@javascript
|
||||
Scenario: Deleted payment method disappears from the list
|
||||
Given I am on the payment method index page
|
||||
When I click "delete" near "PayPal"
|
||||
And I click "delete" from the confirmation modal
|
||||
When I click "Delete" near "PayPal"
|
||||
And I click "Delete" from the confirmation modal
|
||||
Then I should still be on the payment method index page
|
||||
And I should not see payment method with name "PayPal" in that list
|
||||
|
||||
|
|
@ -143,4 +143,4 @@ Feature: Payment methods
|
|||
And I fill in "Name" with "Master Card"
|
||||
And I press "Create"
|
||||
Then I should still be on the payment method creation page
|
||||
And I should see "The payment method with given code already exists."
|
||||
And I should see "The payment method with given code already exists"
|
||||
|
|
|
|||
|
|
@ -52,7 +52,7 @@ Feature: Product archetypes
|
|||
Given I am on the product archetype creation page
|
||||
When I press "Create"
|
||||
Then I should still be on the product archetype creation page
|
||||
And I should see "Please enter archetype name."
|
||||
And I should see "Please enter archetype name"
|
||||
|
||||
Scenario: Creating Bag archetype with color as option
|
||||
and material as attribute
|
||||
|
|
@ -63,7 +63,7 @@ Feature: Product archetypes
|
|||
And I select "Bag material" from "Attributes"
|
||||
And I press "Create"
|
||||
Then I should be on the product archetype index page
|
||||
And I should see "Archetype has been successfully created."
|
||||
And I should see "Archetype has been successfully created"
|
||||
|
||||
Scenario: Creating simple T-Shirt archetype with color and size
|
||||
as options but without attributes
|
||||
|
|
@ -74,7 +74,7 @@ Feature: Product archetypes
|
|||
And I additionally select "T-Shirt size" from "Options"
|
||||
And I press "Create"
|
||||
Then I should be on the product archetype index page
|
||||
And I should see "Archetype has been successfully created."
|
||||
And I should see "Archetype has been successfully created"
|
||||
|
||||
@javascript
|
||||
Scenario: Creating a product by building archetype
|
||||
|
|
@ -90,7 +90,7 @@ Feature: Product archetypes
|
|||
| T-Shirt collection | Champions League '11 |
|
||||
And I press "Create"
|
||||
Then I should be on the page of product "Manchester United tee"
|
||||
And I should see "Product has been successfully created."
|
||||
And I should see "Product has been successfully created"
|
||||
And "T-Shirt fabric" should appear on the page
|
||||
|
||||
Scenario: Updating the archetype
|
||||
|
|
@ -98,7 +98,7 @@ Feature: Product archetypes
|
|||
When I fill in "Name" with "Turbo T-Shirt"
|
||||
And I press "Save changes"
|
||||
Then I should be on the product archetype index page
|
||||
And I should see "Archetype has been successfully updated."
|
||||
And I should see "Archetype has been successfully updated"
|
||||
|
||||
Scenario: Parent archetype choices list
|
||||
Given I am editing product archetype "T-Shirt"
|
||||
|
|
@ -114,13 +114,13 @@ Feature: Product archetypes
|
|||
And I select "Coffee caffeine" from "Attributes"
|
||||
And I press "Create"
|
||||
Then I should be on the product archetype index page
|
||||
And I should see "Archetype has been successfully created."
|
||||
And I should see "Archetype has been successfully created"
|
||||
|
||||
@javascript
|
||||
Scenario: Deleted archetype disappears from the list
|
||||
Given I am on the product archetype index page
|
||||
When I click "delete" near "T-Shirt"
|
||||
And I click "delete" from the confirmation modal
|
||||
When I click "Delete" near "T-Shirt"
|
||||
And I click "Delete" from the confirmation modal
|
||||
Then I should be on the product archetype index page
|
||||
And I should see "Archetype has been successfully deleted"
|
||||
And I should not see archetype with name "T-Shirt" in the list
|
||||
|
|
@ -135,11 +135,11 @@ Feature: Product archetypes
|
|||
And I fill in "Code" with "Arch1"
|
||||
And I press "Create"
|
||||
Then I should still be on the product archetype creation page
|
||||
And I should see "Archetype with given code already exists."
|
||||
And I should see "Archetype with given code already exists"
|
||||
|
||||
Scenario: Try create archetype without code
|
||||
Given I am on the product archetype creation page
|
||||
When I fill in "Name" with "Coffee"
|
||||
And I press "Create"
|
||||
Then I should still be on the product archetype creation page
|
||||
And I should see "Please enter archetype code."
|
||||
And I should see "Please enter archetype code"
|
||||
|
|
|
|||
|
|
@ -50,7 +50,7 @@ Feature: Product attributes
|
|||
And I fill in "Code" with "isbn"
|
||||
And I press "Create"
|
||||
Then I should be on the product attribute index page
|
||||
And I should see "Attribute has been successfully created."
|
||||
And I should see "Attribute has been successfully created"
|
||||
And I should see 3 attributes in the list
|
||||
And I should see attribute with name "ISBN number" in that list
|
||||
|
||||
|
|
@ -62,7 +62,7 @@ Feature: Product attributes
|
|||
| Format | d/m/Y |
|
||||
And I press "Create"
|
||||
Then I should be on the product attribute index page
|
||||
And I should see "Attribute has been successfully created."
|
||||
And I should see "Attribute has been successfully created"
|
||||
And I should see 3 attributes in the list
|
||||
And I should see attribute with name "Released at" in that list
|
||||
|
||||
|
|
@ -75,13 +75,13 @@ Feature: Product attributes
|
|||
| Max length | 255 |
|
||||
And I press "Create"
|
||||
Then I should be on the product attribute index page
|
||||
And I should see "Attribute has been successfully created."
|
||||
And I should see "Attribute has been successfully created"
|
||||
And I should see 3 attributes in the list
|
||||
And I should see attribute with name "Music genre" in that list
|
||||
|
||||
Scenario: Accessing the editing form from the list
|
||||
Given I am on the product attribute index page
|
||||
When I click "edit" near "Book author"
|
||||
When I click "Edit" near "Book author"
|
||||
Then I should be editing product attribute "Book author"
|
||||
|
||||
Scenario: Updating the attribute
|
||||
|
|
@ -89,13 +89,13 @@ Feature: Product attributes
|
|||
When I fill in "Name" with "Author"
|
||||
And I press "Save changes"
|
||||
Then I should still be on the product attribute index page
|
||||
And I should see "Attribute has been successfully updated."
|
||||
And I should see "Attribute has been successfully updated"
|
||||
|
||||
@javascript
|
||||
Scenario: Deleting attribute from the list
|
||||
Given I am on the product attribute index page
|
||||
When I click "delete" near "Book author"
|
||||
And I click "delete" from the confirmation modal
|
||||
When I click "Delete" near "Book author"
|
||||
And I click "Delete" from the confirmation modal
|
||||
Then I should still be on the product attribute index page
|
||||
And I should see "Attribute has been successfully deleted."
|
||||
And I should see "Attribute has been successfully deleted"
|
||||
And I should not see attribute with name "Book author" in that list
|
||||
|
|
|
|||
|
|
@ -35,8 +35,8 @@ Feature: Product options
|
|||
Given I am on the product option creation page
|
||||
When I press "Create"
|
||||
Then I should still be on the product option creation page
|
||||
And I should see "Please enter option name."
|
||||
And I should see "Please enter option presentation."
|
||||
And I should see "Please enter option name"
|
||||
And I should see "Please enter option presentation"
|
||||
|
||||
Scenario: Trying to create option without at least 2 values
|
||||
Given I am on the product option creation page
|
||||
|
|
@ -45,7 +45,7 @@ Feature: Product options
|
|||
And I fill in "Presentation" with "Color"
|
||||
And I press "Create"
|
||||
Then I should still be on the product option creation page
|
||||
And I should see "Please add at least 2 option values."
|
||||
And I should see "Please add at least 2 option values"
|
||||
|
||||
@javascript
|
||||
Scenario: Creating option with 4 possible values
|
||||
|
|
@ -60,7 +60,7 @@ Feature: Product options
|
|||
| OV10 | Purple |
|
||||
And I press "Create"
|
||||
Then I should be on the product option index page
|
||||
And I should see "Option has been successfully created."
|
||||
And I should see "Option has been successfully created"
|
||||
|
||||
@javascript
|
||||
Scenario: Values are listed after creating the option
|
||||
|
|
@ -84,7 +84,7 @@ Feature: Product options
|
|||
| OV8 | XXL |
|
||||
And I press "Save changes"
|
||||
Then I should be on the product option index page
|
||||
And "Option has been successfully updated." should appear on the page
|
||||
And "Option has been successfully updated" should appear on the page
|
||||
And I should see option with value containing "XXL" in the list
|
||||
|
||||
Scenario: Created options appear in the list
|
||||
|
|
@ -95,17 +95,17 @@ Feature: Product options
|
|||
|
||||
Scenario: Updating the option
|
||||
Given I am on the product option index page
|
||||
And I click "edit" near "T-Shirt color"
|
||||
And I click "Edit" near "T-Shirt color"
|
||||
When I fill in "Internal name" with "T-Shirt sex"
|
||||
And I press "Save changes"
|
||||
Then I should be on the product option index page
|
||||
And I should see "Option has been successfully updated."
|
||||
And I should see "Option has been successfully updated"
|
||||
|
||||
@javascript
|
||||
Scenario: Deleted option disappears from the list
|
||||
Given I am on the product option index page
|
||||
When I click "delete" near "T-Shirt color"
|
||||
And I click "delete" from the confirmation modal
|
||||
When I click "Delete" near "T-Shirt color"
|
||||
And I click "Delete" from the confirmation modal
|
||||
Then I should be on the product option index page
|
||||
And I should not see option with name "T-Shirt color" in that list
|
||||
|
||||
|
|
@ -123,7 +123,7 @@ Feature: Product options
|
|||
| OV8 | White |
|
||||
And I press "Create"
|
||||
Then I should still be on the product option creation page
|
||||
And I should see "Please enter option code."
|
||||
And I should see "Please enter option code"
|
||||
|
||||
@javascript
|
||||
Scenario: Try add product option with existing code
|
||||
|
|
@ -136,7 +136,7 @@ Feature: Product options
|
|||
| OV8 | White |
|
||||
And I press "Create"
|
||||
Then I should still be on the product option creation page
|
||||
And I should see "The option with given code already exists."
|
||||
And I should see "The option with given code already exists"
|
||||
|
||||
@javascript
|
||||
Scenario: Try add product option values without code
|
||||
|
|
@ -148,7 +148,7 @@ Feature: Product options
|
|||
And I add option value "White"
|
||||
And I press "Create"
|
||||
Then I should still be on the product option creation page
|
||||
And I should see "Please enter option value code."
|
||||
And I should see "Please enter option value code"
|
||||
|
||||
@javascript
|
||||
Scenario: Try add product option value with existing code
|
||||
|
|
@ -161,4 +161,4 @@ Feature: Product options
|
|||
| OV8 | White |
|
||||
And I press "Create"
|
||||
Then I should still be on the product option creation page
|
||||
And I should see "The option value with given code already exists."
|
||||
And I should see "The option value with given code already exists"
|
||||
|
|
|
|||
|
|
@ -34,4 +34,4 @@ Feature: Browsing products by taxonomies
|
|||
Given I am on the taxonomy index page
|
||||
And I follow "Special"
|
||||
When I click "Browse products" near "Featured"
|
||||
Then I should see "There are no products to display."
|
||||
Then I should see "There are no products to display"
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ Feature: Product variants
|
|||
|
||||
Scenario: Viewing a product without options
|
||||
Given I am on the product index page
|
||||
When I click "details" near "Sticker"
|
||||
When I click "Sticker"
|
||||
Then I should see "There are no options for this product"
|
||||
|
||||
Scenario: Viewing a product with options but without variants
|
||||
|
|
@ -38,12 +38,12 @@ Feature: Product variants
|
|||
Scenario: Submitting form without the price
|
||||
Given I am creating variant of "Black T-Shirt"
|
||||
When I press "Create"
|
||||
Then I should see "Please enter the price."
|
||||
Then I should see "Please enter the price"
|
||||
|
||||
Scenario: Trying to create variant with existing options combination
|
||||
Given I am creating variant of "Super T-Shirt"
|
||||
When I press "Create"
|
||||
Then I should see "Variant with this option set already exists."
|
||||
Then I should see "Variant with this option set already exists"
|
||||
|
||||
Scenario: Trying to create product variant with invalid price
|
||||
Given I am creating variant of "Black T-Shirt"
|
||||
|
|
@ -67,7 +67,7 @@ Feature: Product variants
|
|||
Given I am viewing product "Black T-Shirt"
|
||||
When I press "Generate variants"
|
||||
Then I should still be on the page of product with name "Black T-Shirt"
|
||||
And I should see "Variants have been successfully generated."
|
||||
And I should see "Variants have been successfully generated"
|
||||
And I should see 3 variants in the list
|
||||
|
||||
Scenario: Generating only missing variants of product
|
||||
|
|
@ -77,14 +77,14 @@ Feature: Product variants
|
|||
And I press "Create"
|
||||
And I press "Generate variants"
|
||||
Then I should still be on the page of product with name "Black T-Shirt"
|
||||
And I should see "Variants have been successfully generated."
|
||||
And I should see "Variants have been successfully generated"
|
||||
And I should see 3 variants in the list
|
||||
|
||||
Scenario: Generating all possible variants of product with multiple options
|
||||
Given I am viewing product "Sylius T-Shirt"
|
||||
When I press "Generate variants"
|
||||
Then I should still be on the page of product with name "Sylius T-Shirt"
|
||||
And I should see "Variants have been successfully generated."
|
||||
And I should see "Variants have been successfully generated"
|
||||
And I should see 9 variants in the list
|
||||
|
||||
Scenario: Generating only missing variants of product with multiple options
|
||||
|
|
@ -95,7 +95,7 @@ Feature: Product variants
|
|||
And I press "Create"
|
||||
And I press "Generate variants"
|
||||
Then I should still be on the page of product with name "Sylius T-Shirt"
|
||||
And I should see "Variants have been successfully generated."
|
||||
And I should see "Variants have been successfully generated"
|
||||
And I should see 9 variants in the list
|
||||
|
||||
Scenario: Creating a product variant by selecting option
|
||||
|
|
@ -104,7 +104,7 @@ Feature: Product variants
|
|||
And I select "L" from "Size"
|
||||
And I press "Create"
|
||||
Then I should be on the page of product "Black T-Shirt"
|
||||
And I should see "Variant has been successfully created."
|
||||
And I should see "Variant has been successfully created"
|
||||
|
||||
Scenario: Creating a product variant by selecting multiple options
|
||||
Given I am creating variant of "Sylius T-Shirt"
|
||||
|
|
@ -113,22 +113,22 @@ Feature: Product variants
|
|||
And I select "Red" from "Color"
|
||||
And I press "Create"
|
||||
Then I should be on the page of product "Sylius T-Shirt"
|
||||
And I should see "Variant has been successfully created."
|
||||
And I should see "Variant has been successfully created"
|
||||
|
||||
Scenario: Updating the variant price
|
||||
Given product "Black T-Shirt" is available in all variations
|
||||
And I am on the page of product "Black T-Shirt"
|
||||
When I click "edit" near "Size: L"
|
||||
When I click "Edit" near "Size: L"
|
||||
And I fill in "Price" with "33.99"
|
||||
And I press "Save changes"
|
||||
Then I should be on the page of product "Black T-Shirt"
|
||||
And I should see "Variant has been successfully updated."
|
||||
And I should see "Variant has been successfully updated"
|
||||
|
||||
@javascript
|
||||
Scenario: Deleting product variant
|
||||
Given product "Black T-Shirt" is available in all variations
|
||||
And I am on the page of product "Black T-Shirt"
|
||||
When I click "delete" near "Size: L"
|
||||
And I click "delete" from the confirmation modal
|
||||
When I click "Delete" near "Size: L"
|
||||
And I click "Delete" from the confirmation modal
|
||||
Then I should be on the page of product "Black T-Shirt"
|
||||
And I should see "Variant has been successfully deleted."
|
||||
And I should see "Variant has been successfully deleted"
|
||||
|
|
|
|||
|
|
@ -58,9 +58,9 @@ Feature: Products
|
|||
And I follow "Create product"
|
||||
When I press "Create"
|
||||
Then I should still be on the product creation page
|
||||
And I should see "Please enter product name."
|
||||
And I should see "Please enter product description."
|
||||
And I should see "Please enter the price."
|
||||
And I should see "Please enter product name"
|
||||
And I should see "Please enter product description"
|
||||
And I should see "Please enter the price"
|
||||
|
||||
Scenario: Trying to create a product with invalid price
|
||||
Given I am on the product creation page
|
||||
|
|
@ -68,7 +68,7 @@ Feature: Products
|
|||
And I fill in "Price" with "-0.01"
|
||||
And I press "Create"
|
||||
Then I should still be on the product creation page
|
||||
And I should see "Price must not be negative."
|
||||
And I should see "Price must not be negative"
|
||||
|
||||
Scenario: Creating simple product without any attributes and options
|
||||
Given I am on the product creation page
|
||||
|
|
@ -78,7 +78,7 @@ Feature: Products
|
|||
| Price | 29.99 |
|
||||
And I press "Create"
|
||||
Then I should be on the page of product "Book about Everything"
|
||||
And I should see "Product has been successfully created."
|
||||
And I should see "Product has been successfully created"
|
||||
|
||||
Scenario: Prices are saved correctly
|
||||
Given I am on the product creation page
|
||||
|
|
@ -88,7 +88,7 @@ Feature: Products
|
|||
| Price | 4.10 |
|
||||
And I press "Create"
|
||||
Then I should be on the page of product "Book about Everything"
|
||||
And I should see "Product has been successfully created."
|
||||
And I should see "Product has been successfully created"
|
||||
And I should see "4.10"
|
||||
|
||||
Scenario: Creating product with options
|
||||
|
|
@ -100,7 +100,7 @@ Feature: Products
|
|||
And I select "T-Shirt size" from "Options"
|
||||
And I press "Create"
|
||||
Then I should be on the page of product "Manchester United tee"
|
||||
And "Product has been successfully created." should appear on the page
|
||||
And "Product has been successfully created" should appear on the page
|
||||
And I should see "T-Shirt size"
|
||||
|
||||
@javascript
|
||||
|
|
@ -115,7 +115,7 @@ Feature: Products
|
|||
And I fill in "T-Shirt fabric" with "Polyester"
|
||||
When I press "Create"
|
||||
Then I should be on the page of product "Manchester United tee"
|
||||
And "Product has been successfully created." should appear on the page
|
||||
And "Product has been successfully created" should appear on the page
|
||||
|
||||
@javascript
|
||||
Scenario: Creating product with checkbox attribute
|
||||
|
|
@ -129,7 +129,7 @@ Feature: Products
|
|||
And I check "T-Shirt fare trade"
|
||||
When I press "Create"
|
||||
Then I should be on the page of product "Manchester United tee"
|
||||
And "Product has been successfully created." should appear on the page
|
||||
And "Product has been successfully created" should appear on the page
|
||||
|
||||
@javascript
|
||||
Scenario: Creating product with multiple attributes
|
||||
|
|
@ -146,7 +146,7 @@ Feature: Products
|
|||
And I check "T-Shirt fare trade"
|
||||
When I press "Create"
|
||||
Then I should be on the page of product "FC Barcelona tee"
|
||||
And "Product has been successfully created." should appear on the page
|
||||
And "Product has been successfully created" should appear on the page
|
||||
And I should see "T-Shirt fabric"
|
||||
And I should see "T-Shirt fare trade"
|
||||
|
||||
|
|
@ -163,7 +163,7 @@ Feature: Products
|
|||
When I press "Create"
|
||||
Then I should still be on the product creation page
|
||||
When I go to "Attributes" tab
|
||||
And I should see "This value is too short. It should have 2 characters or more."
|
||||
And I should see "This value is too short. It should have 2 characters or more"
|
||||
|
||||
Scenario: Created products appear in the list
|
||||
Given I am on the product creation page
|
||||
|
|
@ -178,7 +178,7 @@ Feature: Products
|
|||
|
||||
Scenario: Accessing the editing form from the list
|
||||
Given I am on the product index page
|
||||
When I click "edit" near "Mug"
|
||||
When I click "Edit" near "Mug"
|
||||
Then I should be editing product "Mug"
|
||||
|
||||
Scenario: Updating the product data
|
||||
|
|
@ -187,7 +187,7 @@ Feature: Products
|
|||
And I fill in "Description" with "This sticker is awesome"
|
||||
And I press "Save changes"
|
||||
Then I should be on the page of product "Big Sticker"
|
||||
And I should see "Product has been successfully updated."
|
||||
And I should see "Product has been successfully updated"
|
||||
|
||||
@javascript
|
||||
Scenario: Modifying product attributes
|
||||
|
|
@ -206,7 +206,7 @@ Feature: Products
|
|||
When I select "Print" from "Tax category"
|
||||
And I press "Save changes"
|
||||
Then I should be on the page of product "Sticker"
|
||||
And I should see "Product has been successfully updated."
|
||||
And I should see "Product has been successfully updated"
|
||||
And "Print" should appear on the page
|
||||
|
||||
@javascript
|
||||
|
|
@ -218,16 +218,16 @@ Feature: Products
|
|||
And I additionally select "New" from "Special"
|
||||
And I press "Save changes"
|
||||
Then I should be on the page of product "Black T-Shirt"
|
||||
And I should see "Product has been successfully updated."
|
||||
And I should see "Product has been successfully updated"
|
||||
And "Featured" should appear on the page
|
||||
|
||||
@javascript
|
||||
Scenario: Deleting product
|
||||
Given I am on the page of product "Mug"
|
||||
When I press "delete"
|
||||
And I click "delete" from the confirmation modal
|
||||
When I press "Delete"
|
||||
And I click "Delete" from the confirmation modal
|
||||
Then I should be on the product index page
|
||||
And I should see "Product has been successfully deleted."
|
||||
And I should see "Product has been successfully deleted"
|
||||
And I should not see product with name "Mug" in that list
|
||||
|
||||
Scenario: Accessing the product details page from list
|
||||
|
|
@ -246,7 +246,7 @@ Feature: Products
|
|||
And I select "New" from "Main taxon"
|
||||
And I press "Create"
|
||||
Then I should be on the page of product "The best T-shirt"
|
||||
And "Product has been successfully created." should appear on the page
|
||||
And "Product has been successfully created" should appear on the page
|
||||
And "New" should appear on the page
|
||||
|
||||
@javascript
|
||||
|
|
@ -256,16 +256,16 @@ Feature: Products
|
|||
When I select "New" from "Main taxon"
|
||||
And I press "Save changes"
|
||||
Then I should be on the page of product "Black T-Shirt"
|
||||
And I should see "Product has been successfully updated."
|
||||
And I should see "Product has been successfully updated"
|
||||
And "New" should appear on the page
|
||||
|
||||
@javascript
|
||||
Scenario: Deleting product with main taxon
|
||||
Given I am on the page of product "Sticker"
|
||||
When I press "delete"
|
||||
And I click "delete" from the confirmation modal
|
||||
When I press "Delete"
|
||||
And I click "Delete" from the confirmation modal
|
||||
Then I should be on the product index page
|
||||
And I should see "Product has been successfully deleted."
|
||||
And I should see "Product has been successfully deleted"
|
||||
And I should not see product with name "Sticker" in that list
|
||||
|
||||
Scenario: Enabling product
|
||||
|
|
@ -273,11 +273,11 @@ Feature: Products
|
|||
And I am on the page of product "Mug"
|
||||
When I press "Enable"
|
||||
Then I should be on the product index page
|
||||
And I should see "Product has been successfully enabled."
|
||||
And I should see "Product has been successfully enabled"
|
||||
|
||||
Scenario: Disabling product
|
||||
Given There is enabled product named "Mug"
|
||||
And I am on the page of product "Mug"
|
||||
When I press "Disable"
|
||||
Then I should be on the product index page
|
||||
And I should see "Product has been successfully disabled."
|
||||
And I should see "Product has been successfully disabled"
|
||||
|
|
|
|||
|
|
@ -60,7 +60,7 @@ Feature: Promotions
|
|||
Given I am on the promotion creation page
|
||||
When I press "Create"
|
||||
Then I should still be on the promotion creation page
|
||||
And I should see "Please enter promotion name."
|
||||
And I should see "Please enter promotion name"
|
||||
|
||||
@javascript
|
||||
Scenario: Creating new promotion with item total rule
|
||||
|
|
@ -73,7 +73,7 @@ Feature: Promotions
|
|||
And I fill in "Amount" with "5000"
|
||||
And I press "Create"
|
||||
Then I should see "Behat Training"
|
||||
And I should see "Promotion has been successfully created."
|
||||
And I should see "Promotion has been successfully created"
|
||||
|
||||
@javascript
|
||||
Scenario: Creating new promotion with item count rule
|
||||
|
|
@ -86,7 +86,7 @@ Feature: Promotions
|
|||
And I fill in "Count" with "10"
|
||||
And I press "Create"
|
||||
Then I should see "Behat Training"
|
||||
And I should see "Promotion has been successfully created."
|
||||
And I should see "Promotion has been successfully created"
|
||||
|
||||
@javascript
|
||||
Scenario: Creating new promotion with fixed discount action
|
||||
|
|
@ -99,7 +99,7 @@ Feature: Promotions
|
|||
And I fill in "Amount" with "100"
|
||||
And I press "Create"
|
||||
Then I should see "Behat Training"
|
||||
And I should see "Promotion has been successfully created."
|
||||
And I should see "Promotion has been successfully created"
|
||||
|
||||
@javascript
|
||||
Scenario: Creating new promotion with percentage discount action
|
||||
|
|
@ -112,7 +112,7 @@ Feature: Promotions
|
|||
And I fill in "Percentage" with "10"
|
||||
And I press "Create"
|
||||
Then I should see "Sylius Training"
|
||||
And I should see "Promotion has been successfully created."
|
||||
And I should see "Promotion has been successfully created"
|
||||
|
||||
Scenario: Adding coupon manually
|
||||
Given I am on the page of promotion "Press Campaign"
|
||||
|
|
@ -120,7 +120,7 @@ Feature: Promotions
|
|||
When I fill in "Code" with "SPECIAL"
|
||||
And I press "Create"
|
||||
Then I should be on the page of promotion "Press Campaign"
|
||||
And I should see "Promotion coupon has been successfully created."
|
||||
And I should see "Promotion coupon has been successfully created"
|
||||
|
||||
Scenario: Added coupon appears on the list of coupons
|
||||
Given I am on the page of promotion "Press Campaign"
|
||||
|
|
@ -134,14 +134,14 @@ Feature: Promotions
|
|||
Given I am on the page of promotion "Press Campaign"
|
||||
And I follow "Add coupon"
|
||||
When I press "Create"
|
||||
Then I should see "Please enter coupon code."
|
||||
Then I should see "Please enter coupon code"
|
||||
|
||||
Scenario: Coupon usage limit must be at least 1
|
||||
Given I am on the page of promotion "Press Campaign"
|
||||
And I follow "Add coupon"
|
||||
And I fill in "Usage limit" with "-2"
|
||||
When I press "Create"
|
||||
Then I should see "Coupon usage limit must be at least 1."
|
||||
Then I should see "Coupon usage limit must be at least 1"
|
||||
|
||||
Scenario: Adding coupon with usage limit
|
||||
Given I am on the page of promotion "Press Campaign"
|
||||
|
|
@ -150,14 +150,14 @@ Feature: Promotions
|
|||
And I fill in "Usage limit" with "5"
|
||||
And I press "Create"
|
||||
Then I should be on the page of promotion "Press Campaign"
|
||||
And I should see "Promotion coupon has been successfully created."
|
||||
And I should see "Promotion coupon has been successfully created"
|
||||
|
||||
Scenario: Generating coupons
|
||||
Given I am on the page of promotion "Press Campaign"
|
||||
And I follow "Generate coupons"
|
||||
When I fill in "Amount" with "50"
|
||||
And I press "Generate"
|
||||
Then I should see "Promotion coupons have been successfully generated."
|
||||
Then I should see "Promotion coupons have been successfully generated"
|
||||
|
||||
Scenario: Generating coupons with usage limit
|
||||
Given I am on the page of promotion "Press Campaign"
|
||||
|
|
@ -165,14 +165,14 @@ Feature: Promotions
|
|||
When I fill in "Amount" with "5"
|
||||
And I fill in "Usage limit" with "5"
|
||||
And I press "Generate"
|
||||
Then I should see "Promotion coupons have been successfully generated."
|
||||
Then I should see "Promotion coupons have been successfully generated"
|
||||
|
||||
Scenario: Generated coupon appears on the list of coupons
|
||||
Given I am on the page of promotion "Press Campaign"
|
||||
And I follow "Generate coupons"
|
||||
And I fill in "Amount" with "50"
|
||||
And I press "Generate"
|
||||
Then I should see "Promotion coupons have been successfully generated."
|
||||
Then I should see "Promotion coupons have been successfully generated"
|
||||
And I should see "Total: 55"
|
||||
|
||||
Scenario: Amount of coupons to generate is required
|
||||
|
|
@ -180,21 +180,21 @@ Feature: Promotions
|
|||
And I follow "Generate coupons"
|
||||
And I leave "Amount" field blank
|
||||
When I press "Generate"
|
||||
Then I should see "Please enter amount of coupons to generate."
|
||||
Then I should see "Please enter amount of coupons to generate"
|
||||
|
||||
Scenario: Amount of coupons to generate must be at least 1
|
||||
Given I am on the page of promotion "Press Campaign"
|
||||
And I follow "Generate coupons"
|
||||
And I fill in "Amount" with "-4"
|
||||
When I press "Generate"
|
||||
Then I should see "Amount of coupons to generate must be at least 1."
|
||||
Then I should see "Amount of coupons to generate must be at least 1"
|
||||
|
||||
Scenario: Usage limit of coupons generated must be at least 1
|
||||
Given I am on the page of promotion "Press Campaign"
|
||||
And I follow "Generate coupons"
|
||||
And I fill in "Usage limit" with "-4"
|
||||
When I press "Generate"
|
||||
Then I should see "Usage limit of generated coupons must be at least 1."
|
||||
Then I should see "Usage limit of generated coupons must be at least 1"
|
||||
|
||||
@javascript
|
||||
Scenario: Creating promotion with usage limit
|
||||
|
|
@ -208,7 +208,7 @@ Feature: Promotions
|
|||
And I fill in "Usage limit" with "5"
|
||||
And I press "Create"
|
||||
Then I should see "First 5 pay half!"
|
||||
And I should see "Promotion has been successfully created."
|
||||
And I should see "Promotion has been successfully created"
|
||||
|
||||
Scenario: Created promotions appear in the list
|
||||
Given I am on the promotion creation page
|
||||
|
|
@ -222,12 +222,12 @@ Feature: Promotions
|
|||
|
||||
Scenario: Accessing the promotion editing form
|
||||
Given I am on the page of promotion "New Year"
|
||||
When I follow "edit"
|
||||
When I follow "Edit"
|
||||
Then I should be editing promotion "New Year"
|
||||
|
||||
Scenario: Accessing the editing form from the list
|
||||
Given I am on the promotion index page
|
||||
When I click "edit" near "New Year"
|
||||
When I click "Edit" near "New Year"
|
||||
Then I should be editing promotion "New Year"
|
||||
|
||||
Scenario: Updating the promotion
|
||||
|
|
@ -238,48 +238,48 @@ Feature: Promotions
|
|||
|
||||
Scenario: Setting promotion priorities
|
||||
Given I am on the promotion index page
|
||||
When I press "move down"
|
||||
When I press "Move down"
|
||||
Then I should be on the promotion index page
|
||||
And I should see "Promotion has been successfully moved."
|
||||
And I should see "Promotion has been successfully moved"
|
||||
|
||||
@javascript
|
||||
Scenario: Deleting promotion with
|
||||
Given I am on the page of promotion "New Year"
|
||||
When I press "delete"
|
||||
And I click "delete" from the confirmation modal
|
||||
When I press "Delete"
|
||||
And I click "Delete" from the confirmation modal
|
||||
Then I should be on the promotion index page
|
||||
And I should see "Promotion has been successfully deleted."
|
||||
And I should see "Promotion has been successfully deleted"
|
||||
|
||||
@javascript
|
||||
Scenario: Deleted promotion disappears from the list
|
||||
Given I am on the page of promotion "New Year"
|
||||
When I press "delete"
|
||||
And I click "delete" from the confirmation modal
|
||||
When I press "Delete"
|
||||
And I click "Delete" from the confirmation modal
|
||||
Then I should be on the promotion index page
|
||||
And I should not see promotion with name "New Year" in that list
|
||||
|
||||
@javascript
|
||||
Scenario: Deleting promotion via list with
|
||||
Given I am on the promotion index page
|
||||
When I click "delete" near "Press Campaign"
|
||||
And I click "delete" from the confirmation modal
|
||||
When I click "Delete" near "Press Campaign"
|
||||
And I click "Delete" from the confirmation modal
|
||||
Then I should be on the promotion index page
|
||||
And I should see "Promotion has been successfully deleted."
|
||||
And I should see "Promotion has been successfully deleted"
|
||||
|
||||
@javascript
|
||||
Scenario: Deleting promotion rule
|
||||
Given I am on the page of promotion "Christmas"
|
||||
When I press "delete" near "Item total"
|
||||
And I click "delete" from the confirmation modal
|
||||
Then I should see "Promotion rule has been successfully deleted."
|
||||
When I press "Delete" near "Item total"
|
||||
And I click "Delete" from the confirmation modal
|
||||
Then I should see "Promotion rule has been successfully deleted"
|
||||
And I should not see "Order total"
|
||||
|
||||
@javascript
|
||||
Scenario: Deleting promotion action
|
||||
Given I am on the page of promotion "Christmas"
|
||||
When I press "delete" near "Fixed discount"
|
||||
And I click "delete" from the confirmation modal
|
||||
Then I should see "Promotion action has been successfully deleted."
|
||||
When I press "Delete" near "Fixed discount"
|
||||
And I click "Delete" from the confirmation modal
|
||||
Then I should see "Promotion action has been successfully deleted"
|
||||
And I should not see "Fixed discount"
|
||||
|
||||
Scenario: Cannot update promotion code
|
||||
|
|
@ -292,19 +292,19 @@ Feature: Promotions
|
|||
And I fill in "Name" with "Behat Training"
|
||||
And I press "Create"
|
||||
Then I should still be on the promotion creation page
|
||||
And I should see "The promotion with given code already exists."
|
||||
And I should see "The promotion with given code already exists"
|
||||
|
||||
Scenario: Submitting invalid form without code
|
||||
Given I am on the promotion creation page
|
||||
When I fill in "Name" with "Behat Training"
|
||||
And I press "Create"
|
||||
Then I should still be on the promotion creation page
|
||||
And I should see "Please enter promotion code."
|
||||
And I should see "Please enter promotion code"
|
||||
|
||||
Scenario: Cannot update coupon code
|
||||
Given I am on the page of promotion "Press Campaign"
|
||||
When I follow "List coupons"
|
||||
And I click "edit" near "XD0001"
|
||||
And I click "Edit" near "XD0001"
|
||||
Then I should see disabled code field
|
||||
|
||||
Scenario: Try add coupon with existing code
|
||||
|
|
@ -312,4 +312,4 @@ Feature: Promotions
|
|||
And I follow "Add coupon"
|
||||
When I fill in "Code" with "XD0001"
|
||||
And I press "Create"
|
||||
Then I should see "This coupon already exists."
|
||||
Then I should see "This coupon already exists"
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@ Feature: Orm indexer event listener
|
|||
| Price | 29.99 |
|
||||
And I press "Create"
|
||||
Then I should be on the page of product "Index test product"
|
||||
And I should see "Product has been successfully created."
|
||||
And I should see "Product has been successfully created"
|
||||
And I should find an indexed entry for "Interesting description"
|
||||
|
||||
Scenario: Updating the product description and update the index accordingly
|
||||
|
|
@ -47,7 +47,7 @@ Feature: Orm indexer event listener
|
|||
|
||||
Scenario: Deleting product should delete the index as well
|
||||
Given I am on the page of product "Sylius Tee"
|
||||
When I press "delete"
|
||||
When I press "Delete"
|
||||
Then I should be on the product index page
|
||||
And I should see "Product has been successfully deleted."
|
||||
And I should see "Product has been successfully deleted"
|
||||
And I should not find an indexed entry for "a very nice php t-shirt"
|
||||
|
|
|
|||
|
|
@ -36,24 +36,24 @@ Feature: Shipments
|
|||
@javascript
|
||||
Scenario: Deleting shipment
|
||||
Given I am on the shipment page with method "DHL"
|
||||
When I press "delete"
|
||||
And I click "delete" from the confirmation modal
|
||||
When I press "Delete"
|
||||
And I click "Delete" from the confirmation modal
|
||||
Then I should be on the shipment index page
|
||||
And I should see "Shipment has been successfully deleted."
|
||||
And I should see "Shipment has been successfully deleted"
|
||||
And I should not see shipment with method "DHL" in that list
|
||||
|
||||
@javascript
|
||||
Scenario: Deleting shipment from the list
|
||||
Given I am on the shipment index page
|
||||
When I click "delete" near "DHL"
|
||||
And I click "delete" from the confirmation modal
|
||||
When I click "Delete" near "DHL"
|
||||
And I click "Delete" from the confirmation modal
|
||||
Then I should still be on the shipment index page
|
||||
And I should see "Shipment has been successfully deleted."
|
||||
And I should see "Shipment has been successfully deleted"
|
||||
And I should not see shipment with method "DHL" in that list
|
||||
|
||||
Scenario: Accessing shipment details page via list
|
||||
Given I am on the shipment index page
|
||||
When I click "details" near "DHL"
|
||||
When I click "Details" near "DHL"
|
||||
Then I should be on the shipment page with method "DHL"
|
||||
|
||||
Scenario: Displaying the shipment state on details page
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@ Feature: Shipping categories
|
|||
And I fill in "Code" with "SC32"
|
||||
And I press "Create"
|
||||
Then I should be on the shipping category index page
|
||||
And I should see "Shipping category has been successfully created."
|
||||
And I should see "Shipping category has been successfully created"
|
||||
|
||||
Scenario: Created shipping categories appear in the list
|
||||
Given I created shipping category "Light" with code "SC3"
|
||||
|
|
@ -52,7 +52,7 @@ Feature: Shipping categories
|
|||
|
||||
Scenario: Accessing the editing form from the list
|
||||
Given I am on the shipping category index page
|
||||
When I click "edit" near "Heavy"
|
||||
When I click "Edit" near "Heavy"
|
||||
Then I should be editing shipping category "Heavy"
|
||||
|
||||
Scenario: Updating the shipping category
|
||||
|
|
@ -60,7 +60,7 @@ Feature: Shipping categories
|
|||
When I fill in "Name" with "Light"
|
||||
And I press "Save changes"
|
||||
Then I should be on the shipping category index page
|
||||
And I should see "Shipping category has been successfully updated."
|
||||
And I should see "Shipping category has been successfully updated"
|
||||
|
||||
Scenario: Cannot update shipping category code
|
||||
When I am editing shipping category "Heavy"
|
||||
|
|
@ -84,8 +84,8 @@ Feature: Shipping categories
|
|||
@javascript
|
||||
Scenario: Deleting shipping category from list
|
||||
Given I am on the shipping category index page
|
||||
When I click "delete" near "Heavy"
|
||||
And I click "delete" from the confirmation modal
|
||||
When I click "Delete" near "Heavy"
|
||||
And I click "Delete" from the confirmation modal
|
||||
Then I should be on the shipping category index page
|
||||
And I should see "Shipping category has been successfully deleted."
|
||||
And I should see "Shipping category has been successfully deleted"
|
||||
And I should not see shipping category with name "Heavy" in that list
|
||||
|
|
|
|||
|
|
@ -49,7 +49,7 @@ Feature: Shipping methods
|
|||
Given I am on the shipping method creation page
|
||||
When I press "Create"
|
||||
Then I should still be on the shipping method creation page
|
||||
And I should see "Please enter shipping method name."
|
||||
And I should see "Please enter shipping method name"
|
||||
|
||||
@javascript
|
||||
Scenario: Creating new shipping method for specific zone
|
||||
|
|
@ -61,7 +61,7 @@ Feature: Shipping methods
|
|||
And I fill in "Amount" with "10"
|
||||
And I press "Create"
|
||||
Then I should be on the page of shipping method "FedEx World Shipping"
|
||||
And I should see "Shipping method has been successfully created."
|
||||
And I should see "Shipping method has been successfully created"
|
||||
And I should see "USA"
|
||||
|
||||
@javascript
|
||||
|
|
@ -74,7 +74,7 @@ Feature: Shipping methods
|
|||
And I fill in "Amount" with "10"
|
||||
And I press "Create"
|
||||
Then I should be on the page of shipping method "FedEx World Shipping"
|
||||
And I should see "Shipping method has been successfully created."
|
||||
And I should see "Shipping method has been successfully created"
|
||||
|
||||
@javascript
|
||||
Scenario: Creating new shipping method with flat rate per shipment
|
||||
|
|
@ -85,7 +85,7 @@ Feature: Shipping methods
|
|||
And I fill in "Amount" with "10"
|
||||
And I press "Create"
|
||||
Then I should be on the page of shipping method "FedEx World Shipping"
|
||||
And I should see "Shipping method has been successfully created."
|
||||
And I should see "Shipping method has been successfully created"
|
||||
|
||||
@javascript
|
||||
Scenario: Creating new shipping method with flexible rate
|
||||
|
|
@ -98,7 +98,7 @@ Feature: Shipping methods
|
|||
And I fill in "Limit additional items" with "5"
|
||||
And I press "Create"
|
||||
Then I should be on the page of shipping method "FedEx World Shipping"
|
||||
And I should see "Shipping method has been successfully created."
|
||||
And I should see "Shipping method has been successfully created"
|
||||
|
||||
Scenario: Created shipping methods appear in the list
|
||||
Given I created shipping method "FedEx World Shipping" with code "SM7" and zone "USA"
|
||||
|
|
@ -108,12 +108,12 @@ Feature: Shipping methods
|
|||
|
||||
Scenario: Accessing the shipping method editing form
|
||||
Given I am on the page of shipping method "DHL"
|
||||
When I follow "edit"
|
||||
When I follow "Edit"
|
||||
Then I should be editing shipping method "DHL"
|
||||
|
||||
Scenario: Accessing the editing form from the list
|
||||
Given I am on the shipping method index page
|
||||
When I click "edit" near "FedEx"
|
||||
When I click "Edit" near "FedEx"
|
||||
Then I should be editing shipping method "FedEx"
|
||||
|
||||
@javascript
|
||||
|
|
@ -154,4 +154,4 @@ Feature: Shipping methods
|
|||
When I fill in "Name" with "MegaPackage"
|
||||
And I press "Create"
|
||||
Then I should still be on the shipping method creation page
|
||||
And I should see "Please enter shipping method code."
|
||||
And I should see "Please enter shipping method code"
|
||||
|
|
|
|||
|
|
@ -41,7 +41,7 @@ Feature: Tax categories
|
|||
And I fill in "Name" with "Taxable goods"
|
||||
And I press "Create"
|
||||
Then I should be on the tax category index page
|
||||
And I should see "Tax category has been successfully created."
|
||||
And I should see "Tax category has been successfully created"
|
||||
|
||||
Scenario: Created tax categories appear in the list
|
||||
Given I created tax category "Food" with code "TC3"
|
||||
|
|
@ -51,7 +51,7 @@ Feature: Tax categories
|
|||
|
||||
Scenario: Accessing the editing form from the list
|
||||
Given I am on the tax category index page
|
||||
When I click "edit" near "Clothing"
|
||||
When I click "Edit" near "Clothing"
|
||||
Then I should be editing tax category "Clothing"
|
||||
|
||||
Scenario: Updating the tax category
|
||||
|
|
@ -59,21 +59,21 @@ Feature: Tax categories
|
|||
When I fill in "Name" with "Clothing & Accessories"
|
||||
And I press "Save changes"
|
||||
Then I should be on the tax category index page
|
||||
And I should see "Tax category has been successfully updated."
|
||||
And I should see "Tax category has been successfully updated"
|
||||
|
||||
@javascript
|
||||
Scenario: Deleting tax category
|
||||
Given I am on the tax category index page
|
||||
When I click "delete" near "Clothing"
|
||||
And I click "delete" from the confirmation modal
|
||||
When I click "Delete" near "Clothing"
|
||||
And I click "Delete" from the confirmation modal
|
||||
Then I should be on the tax category index page
|
||||
And I should see "Tax category has been successfully deleted."
|
||||
And I should see "Tax category has been successfully deleted"
|
||||
|
||||
@javascript
|
||||
Scenario: Deleted tax category disappears from the list
|
||||
Given I am on the tax category index page
|
||||
When I click "delete" near "Clothing"
|
||||
And I click "delete" from the confirmation modal
|
||||
When I click "Delete" near "Clothing"
|
||||
And I click "Delete" from the confirmation modal
|
||||
Then I should be on the tax category index page
|
||||
And I should not see tax category with name "Clothing" in that list
|
||||
|
||||
|
|
@ -94,4 +94,4 @@ Feature: Tax categories
|
|||
When I fill in "Name" with "Computers"
|
||||
And I press "Create"
|
||||
Then I should still be on the tax category creation page
|
||||
And I should see "Please enter tax category code."
|
||||
And I should see "Please enter tax category code"
|
||||
|
|
|
|||
|
|
@ -53,7 +53,7 @@ Feature: Tax rates
|
|||
And I leave "Amount" empty
|
||||
And I press "Create"
|
||||
Then I should still be on the tax rate creation page
|
||||
And I should see "Please enter tax rate amount."
|
||||
And I should see "Please enter tax rate amount"
|
||||
|
||||
Scenario: Creating new tax rate
|
||||
Given I am on the tax rate creation page
|
||||
|
|
@ -63,7 +63,7 @@ Feature: Tax rates
|
|||
And I select "USA" from "Zone"
|
||||
When I press "Create"
|
||||
Then I should be on the page of tax rate "US Food Tax"
|
||||
And I should see "Tax rate has been successfully created."
|
||||
And I should see "Tax rate has been successfully created"
|
||||
|
||||
Scenario: Creating tax rate included in price
|
||||
Given I am on the tax rate creation page
|
||||
|
|
@ -74,7 +74,7 @@ Feature: Tax rates
|
|||
And I check "Included in price?"
|
||||
When I press "Create"
|
||||
Then I should be on the page of tax rate "EU VAT"
|
||||
And I should see "Tax rate has been successfully created."
|
||||
And I should see "Tax rate has been successfully created"
|
||||
|
||||
Scenario: Created tax rates appear in the list
|
||||
Given I created 18% tax "Food Tax" with code "TR5" for category "Food" with zone "USA"
|
||||
|
|
@ -84,57 +84,57 @@ Feature: Tax rates
|
|||
|
||||
Scenario: Accessing the tax rate editing form
|
||||
Given I am on the page of tax rate "US Clothing Tax"
|
||||
And I follow "edit"
|
||||
And I follow "Edit"
|
||||
Then I should be editing tax rate "US Clothing Tax"
|
||||
|
||||
Scenario: Accessing the editing form from the list
|
||||
Given I am on the tax rate index page
|
||||
And I click "edit" near "US Clothing Tax"
|
||||
And I click "Edit" near "US Clothing Tax"
|
||||
Then I should be editing tax rate "US Clothing Tax"
|
||||
|
||||
Scenario: Updating the tax rate
|
||||
Given I am on the page of tax rate "UK+DE Clothing Tax"
|
||||
And I follow "edit"
|
||||
And I follow "Edit"
|
||||
When I fill in "Name" with "General Tax"
|
||||
And I press "Save changes"
|
||||
Then I should be on the page of tax rate "General Tax"
|
||||
|
||||
Scenario: Deleting tax rate
|
||||
Given I am on the page of tax rate "US Clothing Tax"
|
||||
When I press "delete"
|
||||
When I press "Delete"
|
||||
Then I should see "Do you want to delete this item"
|
||||
When I press "delete"
|
||||
When I press "Delete"
|
||||
Then I should be on the tax rate index page
|
||||
And I should see "Tax rate has been successfully deleted."
|
||||
And I should see "Tax rate has been successfully deleted"
|
||||
|
||||
@javascript
|
||||
Scenario: Deleting tax rate
|
||||
Given I am on the page of tax rate "US Clothing Tax"
|
||||
When I press "delete"
|
||||
And I click "delete" from the confirmation modal
|
||||
When I press "Delete"
|
||||
And I click "Delete" from the confirmation modal
|
||||
Then I should be on the tax rate index page
|
||||
And I should see "Tax rate has been successfully deleted."
|
||||
And I should see "Tax rate has been successfully deleted"
|
||||
|
||||
@javascript
|
||||
Scenario: Deleted tax rate disappears from the list
|
||||
Given I am on the page of tax rate "US Electronics Tax"
|
||||
When I press "delete"
|
||||
And I click "delete" from the confirmation modal
|
||||
When I press "Delete"
|
||||
And I click "Delete" from the confirmation modal
|
||||
Then I should be on the tax rate index page
|
||||
And I should not see tax rate with name "US Electronics Tax" in that list
|
||||
|
||||
@javascript
|
||||
Scenario: Deleting tax rate from the list
|
||||
Given I am on the tax rate index page
|
||||
When I click "delete" near "US Electronics Tax"
|
||||
And I click "delete" from the confirmation modal
|
||||
When I click "Delete" near "US Electronics Tax"
|
||||
And I click "Delete" from the confirmation modal
|
||||
Then I should still be on the tax rate index page
|
||||
And "Tax rate has been successfully deleted." should appear on the page
|
||||
And "Tax rate has been successfully deleted" should appear on the page
|
||||
But I should not see tax rate with name "US Electronics Tax" in that list
|
||||
|
||||
Scenario: Accessing tax rate details page via list
|
||||
Given I am on the tax rate index page
|
||||
When I click "details" near "US Electronics Tax"
|
||||
When I click "Details" near "US Electronics Tax"
|
||||
Then I should be on the page of tax rate "US Electronics Tax"
|
||||
|
||||
Scenario: Displaying the tax rate amount on details page
|
||||
|
|
@ -160,4 +160,4 @@ Feature: Tax rates
|
|||
And I fill in "Amount" with "30"
|
||||
And I press "Create"
|
||||
Then I should still be on the tax rate creation page
|
||||
And I should see "Please enter tax rate code."
|
||||
And I should see "Please enter tax rate code"
|
||||
|
|
|
|||
|
|
@ -21,11 +21,11 @@ Feature: Taxation settings
|
|||
Given I am on the taxation settings page
|
||||
When I press "Save changes"
|
||||
Then I should still be on the taxation settings page
|
||||
And I should see "Settings have been successfully updated."
|
||||
And I should see "Settings have been successfully updated"
|
||||
|
||||
Scenario: Editing the default tax zone
|
||||
Given I am on the taxation settings page
|
||||
When I select "USA" from "Default tax zone"
|
||||
And I press "Save changes"
|
||||
Then I should still be on the taxation settings page
|
||||
And I should see "Settings have been successfully updated."
|
||||
And I should see "Settings have been successfully updated"
|
||||
|
|
|
|||
|
|
@ -47,7 +47,7 @@ Feature: taxonomies
|
|||
And I fill in "Code" with "RTX3"
|
||||
And I press "Create"
|
||||
Then I should be on the page of taxonomy "Vendor"
|
||||
And I should see "Taxonomy has been successfully created."
|
||||
And I should see "Taxonomy has been successfully created"
|
||||
|
||||
Scenario: Created taxonomies appear in the list
|
||||
Given I created taxonomy "Food" with code "RTX4"
|
||||
|
|
@ -57,7 +57,7 @@ Feature: taxonomies
|
|||
|
||||
Scenario: Accessing the editing form from the list
|
||||
Given I am on the taxonomy index page
|
||||
When I click "edit" near "Category"
|
||||
When I click "Edit" near "Category"
|
||||
Then I should be editing taxonomy "Category"
|
||||
|
||||
Scenario: Updating the taxonomy
|
||||
|
|
@ -65,21 +65,21 @@ Feature: taxonomies
|
|||
When I fill in "Name" with "Brands"
|
||||
And I press "Save changes"
|
||||
Then I should be on the page of taxonomy "Brands"
|
||||
And I should see "Taxonomy has been successfully updated."
|
||||
And I should see "Taxonomy has been successfully updated"
|
||||
|
||||
@javascript
|
||||
Scenario: Deleting taxonomy
|
||||
Given I am on the taxonomy index page
|
||||
When I click "delete" near "Brand"
|
||||
And I click "delete" from the confirmation modal
|
||||
When I click "Delete" near "Brand"
|
||||
And I click "Delete" from the confirmation modal
|
||||
Then I should be on the taxonomy index page
|
||||
And I should see "Taxonomy has been successfully deleted."
|
||||
And I should see "Taxonomy has been successfully deleted"
|
||||
|
||||
@javascript
|
||||
Scenario: Deleted taxonomy disappears from the list
|
||||
Given I am on the taxonomy index page
|
||||
When I click "delete" near "Category"
|
||||
And I click "delete" from the confirmation modal
|
||||
When I click "Delete" near "Category"
|
||||
And I click "Delete" from the confirmation modal
|
||||
Then I should be on the taxonomy index page
|
||||
And I should not see taxonomy with name "Category" in that list
|
||||
|
||||
|
|
@ -101,14 +101,14 @@ Feature: taxonomies
|
|||
And I fill in "Code" with "TX9"
|
||||
And I press "Create"
|
||||
Then I should be on the page of taxonomy "Category"
|
||||
And I should see "Taxon has been successfully created."
|
||||
And I should see "Taxon has been successfully created"
|
||||
# TODO
|
||||
# Scenario: Creating new taxon with existing name under given taxonomy
|
||||
# Given I am on the page of taxonomy "Category"
|
||||
# And I follow "Create taxon"
|
||||
# When I fill in "Name" with "Electronics"
|
||||
# And I press "Create"
|
||||
# And I should see "Name already in use in the parent taxon."
|
||||
# And I should see "Name already in use in the parent taxon"
|
||||
|
||||
Scenario: Creating new taxon with existing name under different taxon
|
||||
Given I am on the page of taxonomy "Category"
|
||||
|
|
@ -118,7 +118,7 @@ Feature: taxonomies
|
|||
And I select "Clothing" from "Parent"
|
||||
And I press "Create"
|
||||
Then I should be on the page of taxonomy "Category"
|
||||
And I should see "Taxon has been successfully created."
|
||||
And I should see "Taxon has been successfully created"
|
||||
And I should see 9 taxons in the list
|
||||
|
||||
Scenario: Creating new taxon with parent
|
||||
|
|
@ -129,43 +129,43 @@ Feature: taxonomies
|
|||
And I select "Electronics" from "Parent"
|
||||
And I press "Create"
|
||||
Then I should be on the page of taxonomy "Category"
|
||||
And I should see "Taxon has been successfully created."
|
||||
And I should see "Taxon has been successfully created"
|
||||
|
||||
Scenario: Renaming the taxon
|
||||
Given I am on the page of taxonomy "Category"
|
||||
And I click "edit" near "Clothing"
|
||||
And I click "Edit" near "Clothing"
|
||||
When I fill in "Name" with "Clothing and accessories"
|
||||
And I press "Save changes"
|
||||
Then I should be on the page of taxonomy "Category"
|
||||
And I should see "Taxon has been successfully updated."
|
||||
And I should see "Taxon has been successfully updated"
|
||||
|
||||
Scenario: Changing taxon slug
|
||||
Given permalink of taxon "Clothing" in "Category" taxonomy has been changed to "super-clothing"
|
||||
And I am on the page of taxonomy "Category"
|
||||
When I click "edit" near "Clothing"
|
||||
When I click "Edit" near "Clothing"
|
||||
Then I should see "category/super-clothing" in "Permalink" field
|
||||
|
||||
Scenario: Changing taxon slug with parent slug prefix
|
||||
Given permalink of taxon "Clothing" in "Category" taxonomy has been changed to "category/super-clothing-category/best"
|
||||
And I am on the page of taxonomy "Category"
|
||||
When I click "edit" near "Clothing"
|
||||
When I click "Edit" near "Clothing"
|
||||
Then I should see "category/super-clothing-category-best" in "Permalink" field
|
||||
|
||||
@javascript
|
||||
Scenario: Deleting taxons
|
||||
Given I am on the page of taxonomy "Category"
|
||||
When I click "delete" near "Electronics"
|
||||
And I click "delete" from the confirmation modal
|
||||
When I click "Delete" near "Electronics"
|
||||
And I click "Delete" from the confirmation modal
|
||||
Then I should still be on the page of taxonomy "Category"
|
||||
And I should see "Taxon has been successfully deleted."
|
||||
And I should see "Taxon has been successfully deleted"
|
||||
|
||||
@javascript
|
||||
Scenario: Deleted taxons disappear from the list
|
||||
Given I am on the page of taxonomy "Category"
|
||||
When I click "delete" near "Clothing"
|
||||
And I click "delete" from the confirmation modal
|
||||
When I click "Delete" near "Clothing"
|
||||
And I click "Delete" from the confirmation modal
|
||||
Then I should still be on the page of taxonomy "Category"
|
||||
And "Taxon has been successfully deleted." should appear on the page
|
||||
And "Taxon has been successfully deleted" should appear on the page
|
||||
And I should see 5 taxons in the list
|
||||
|
||||
Scenario: Cannot update taxon code
|
||||
|
|
@ -179,7 +179,7 @@ Feature: taxonomies
|
|||
And I fill in "Code" with "TX1"
|
||||
And I press "Create"
|
||||
Then I should still be on the taxon creation page from taxonomy "Category"
|
||||
And I should see "Taxon with given code already exists."
|
||||
And I should see "Taxon with given code already exists"
|
||||
|
||||
Scenario: Try create taxon without code
|
||||
Given I am on the page of taxonomy "Category"
|
||||
|
|
@ -187,4 +187,4 @@ Feature: taxonomies
|
|||
When I fill in "Name" with "Cars"
|
||||
And I press "Create"
|
||||
Then I should still be on the taxon creation page from taxonomy "Category"
|
||||
And I should see "Please enter taxon code."
|
||||
And I should see "Please enter taxon code"
|
||||
|
|
|
|||
|
|
@ -36,8 +36,8 @@ Feature: Zones
|
|||
Given I am on the zone creation page for type "country"
|
||||
When I press "Create"
|
||||
Then I should still be on the zone creation page for type "country"
|
||||
And I should see "Please enter zone name."
|
||||
And I should see "Please enter zone code."
|
||||
And I should see "Please enter zone name"
|
||||
And I should see "Please enter zone code"
|
||||
|
||||
Scenario: Creating new zone requires adding at least 1 member
|
||||
Given I am on the zone creation page for type "country"
|
||||
|
|
@ -45,7 +45,7 @@ Feature: Zones
|
|||
And I fill in "Code" with "EU"
|
||||
When I press "Create"
|
||||
Then I should still be on the zone creation page for type "country"
|
||||
And I should see "Please add at least 1 zone member."
|
||||
And I should see "Please add at least 1 zone member"
|
||||
|
||||
@javascript
|
||||
Scenario: Creating new zone built from countries
|
||||
|
|
@ -57,7 +57,7 @@ Feature: Zones
|
|||
And I add zone member "Germany"
|
||||
When I press "Create"
|
||||
Then I should be on the page of zone "European Union"
|
||||
And I should see "Zone has been successfully created."
|
||||
And I should see "Zone has been successfully created"
|
||||
And "EE" should appear on the page
|
||||
And "DE" should appear on the page
|
||||
And "shipping" should appear on the page
|
||||
|
|
@ -70,12 +70,12 @@ Feature: Zones
|
|||
|
||||
Scenario: Accessing the zone edit form
|
||||
Given I am on the page of zone "USA GMT-8"
|
||||
When I follow "edit"
|
||||
When I follow "Edit"
|
||||
Then I should be editing zone "USA GMT-8"
|
||||
|
||||
Scenario: Accessing the editing form from list
|
||||
Given I am on the zone index page
|
||||
When I click "edit" near "USA GMT-8"
|
||||
When I click "Edit" near "USA GMT-8"
|
||||
Then I should be editing zone "USA GMT-8"
|
||||
|
||||
@javascript
|
||||
|
|
@ -85,7 +85,7 @@ Feature: Zones
|
|||
And I remove the first province
|
||||
And I press "Save changes"
|
||||
Then I should be on the page of zone "USA GMT-9"
|
||||
And I should see "Zone has been successfully updated."
|
||||
And I should see "Zone has been successfully updated"
|
||||
And "California" should not appear on the page
|
||||
|
||||
Scenario: Cannot edit zone code
|
||||
|
|
@ -97,7 +97,7 @@ Feature: Zones
|
|||
When I fill in "Name" with "USA GMT-9"
|
||||
And I press "Save changes"
|
||||
Then I should be on the page of zone "USA GMT-9"
|
||||
And I should see "Zone has been successfully updated."
|
||||
And I should see "Zone has been successfully updated"
|
||||
But I should not see zone with name "USA GMT-8" in the list
|
||||
|
||||
@javascript
|
||||
|
|
@ -107,23 +107,23 @@ Feature: Zones
|
|||
When I add zone member "Poland"
|
||||
And I press "Save changes"
|
||||
Then I should be on the page of zone "Baltic states"
|
||||
And I should see "Zone has been successfully updated."
|
||||
And I should see "Zone has been successfully updated"
|
||||
And "PL" should appear on the page
|
||||
|
||||
@javascript
|
||||
Scenario: Deleting zone
|
||||
Given I am on the page of zone "Germany"
|
||||
When I press "delete"
|
||||
And I click "delete" from the confirmation modal
|
||||
When I press "Delete"
|
||||
And I click "Delete" from the confirmation modal
|
||||
Then I should be on the zone index page
|
||||
And I should see "Zone has been successfully deleted."
|
||||
And I should see "Zone has been successfully deleted"
|
||||
And I should not see zone with name "Germany" in that list
|
||||
|
||||
@javascript
|
||||
Scenario: Deleting zone from list
|
||||
Given I am on the zone index page
|
||||
When I click "delete" near "USA GMT-8"
|
||||
And I click "delete" from the confirmation modal
|
||||
When I click "Delete" near "USA GMT-8"
|
||||
And I click "Delete" from the confirmation modal
|
||||
Then I should still be on the zone index page
|
||||
And I should see "Zone has been successfully deleted."
|
||||
And I should see "Zone has been successfully deleted"
|
||||
And I should not see zone with name "USA GMT-8" in that list
|
||||
|
|
|
|||
|
|
@ -72,7 +72,7 @@ Feature: Channel management
|
|||
|
||||
Scenario: Accessing the channel edit form
|
||||
Given I am on the channel index page
|
||||
When I click "edit" near "WEB-US"
|
||||
When I click "Edit" near "WEB-US"
|
||||
Then I should be editing channel with code "WEB-US"
|
||||
|
||||
Scenario: Updating the channel
|
||||
|
|
@ -85,8 +85,8 @@ Feature: Channel management
|
|||
@javascript
|
||||
Scenario: Deleting a channel
|
||||
Given I am on the channel index page
|
||||
When I press "delete" near "WEB-EU"
|
||||
And I click "delete" from the confirmation modal
|
||||
When I press "Delete" near "WEB-EU"
|
||||
And I click "Delete" from the confirmation modal
|
||||
Then I should still be on the channel index page
|
||||
And I should see "Channel has been successfully deleted"
|
||||
And I should not see channel with name "mystore.eu" in the list
|
||||
|
|
@ -100,7 +100,7 @@ Feature: Channel management
|
|||
And I select "FedEx" from "Shipping Methods"
|
||||
When I press "Create"
|
||||
Then I should still be on the channel creation page
|
||||
And I should see "Please enter channel code."
|
||||
And I should see "Please enter channel code"
|
||||
|
||||
Scenario: Cannot edit channel code
|
||||
When I am editing channel "mystore.us"
|
||||
|
|
@ -116,4 +116,4 @@ Feature: Channel management
|
|||
And I select "FedEx" from "Shipping Methods"
|
||||
When I press "Create"
|
||||
Then I should still be on the channel creation page
|
||||
And I should see "Channel code has to be unique."
|
||||
And I should see "Channel code has to be unique"
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@ Feature: Contact requests management
|
|||
Scenario: Seeing empty index of contact requests
|
||||
Given there are no contact requests
|
||||
When I am on the contact request index page
|
||||
Then I should see "There are no contact requests to display."
|
||||
Then I should see "There are no contact requests to display"
|
||||
|
||||
Scenario: Accessing the contact request creation form
|
||||
Given I am on the dashboard page
|
||||
|
|
@ -39,7 +39,7 @@ Feature: Contact requests management
|
|||
Given I am on the contact request creation page
|
||||
When I press "Create"
|
||||
Then I should still be on the contact request creation page
|
||||
And I should see "Please enter first name."
|
||||
And I should see "Please enter first name"
|
||||
|
||||
Scenario: Creating new contact request
|
||||
Given I am on the contact request creation page
|
||||
|
|
@ -50,12 +50,12 @@ Feature: Contact requests management
|
|||
And I fill in "Message" with "Example message"
|
||||
And I press "Create"
|
||||
Then I should be on the contact request index page
|
||||
And I should see "Contact request has been successfully created."
|
||||
And I should see "Contact request has been successfully created"
|
||||
And I should see contact request with email "john@example.com" in the list
|
||||
|
||||
Scenario: Accessing the contact request edit form
|
||||
Given I am on the contact request index page
|
||||
When I click "edit" near "john@doe.com"
|
||||
When I click "Edit" near "john@doe.com"
|
||||
Then I should be editing contact request with email "john@doe.com"
|
||||
|
||||
Scenario: Updating the contact request
|
||||
|
|
@ -67,7 +67,7 @@ Feature: Contact requests management
|
|||
|
||||
Scenario: Deleting a contact request
|
||||
Given I am on the contact request index page
|
||||
When I press "delete" near "john@doe.com"
|
||||
When I press "Delete" near "john@doe.com"
|
||||
Then I should still be on the contact request index page
|
||||
And I should see "Contact request has been successfully deleted."
|
||||
And I should see "Contact request has been successfully deleted"
|
||||
And I should not see contact request with email "jonh@doe.com" in the list
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ Feature: Contact requesting
|
|||
Given I am on the contact page
|
||||
When I press "Send"
|
||||
Then I should still be on the contact page
|
||||
And I should see "Please enter first name."
|
||||
And I should see "Please enter first name"
|
||||
|
||||
Scenario: Submitting contact form
|
||||
Given I am on the contact page
|
||||
|
|
@ -28,4 +28,4 @@ Feature: Contact requesting
|
|||
And I select "Delivery" from "Topic"
|
||||
And I press "Send"
|
||||
Then I should be on the contact page
|
||||
And I should see "Contact has been successfully sent."
|
||||
And I should see "Contact has been successfully sent"
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ Feature: Contact topics management
|
|||
Scenario: Seeing empty index of contact topics
|
||||
Given there are no contact topics
|
||||
When I am on the contact topic index page
|
||||
Then I should see "There are no contact topics to display."
|
||||
Then I should see "There are no contact topics to display"
|
||||
|
||||
Scenario: Accessing the contact topic creation form
|
||||
Given I am on the dashboard page
|
||||
|
|
@ -35,19 +35,19 @@ Feature: Contact topics management
|
|||
Given I am on the contact topic creation page
|
||||
When I press "Create"
|
||||
Then I should still be on the contact topic creation page
|
||||
And I should see "Please enter title."
|
||||
And I should see "Please enter title"
|
||||
|
||||
Scenario: Creating new contact topic
|
||||
Given I am on the contact topic creation page
|
||||
When I fill in "Title" with "Product request"
|
||||
And I press "Create"
|
||||
Then I should be on the contact topic index page
|
||||
And I should see "Contact topic has been successfully created."
|
||||
And I should see "Contact topic has been successfully created"
|
||||
And I should see topic with title "Product request" in the list
|
||||
|
||||
Scenario: Accessing the contact topic edit form
|
||||
Given I am on the contact topic index page
|
||||
When I click "edit" near "Order return"
|
||||
When I click "Edit" near "Order return"
|
||||
Then I should be editing contact topic with title "Order return"
|
||||
|
||||
Scenario: Updating the contact topic title
|
||||
|
|
@ -59,7 +59,7 @@ Feature: Contact topics management
|
|||
|
||||
Scenario: Deleting a contact topic
|
||||
Given I am on the contact topic index page
|
||||
When I press "delete" near "Delivery"
|
||||
When I press "Delete" near "Delivery"
|
||||
Then I should still be on the contact topic index page
|
||||
And I should see "Contact topic has been successfully deleted."
|
||||
And I should not see contact topic with title "Delivery" in the list
|
||||
And I should see "Contact topic has been successfully deleted"
|
||||
And I should not see contact topic with title "Delivery" in the list
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ Feature: Currency management
|
|||
Scenario: Seeing empty index of currencies
|
||||
Given there are no currencies
|
||||
When I am on the currency index page
|
||||
Then I should see "There are no currencies to display."
|
||||
Then I should see "There are no currencies to display"
|
||||
|
||||
Scenario: Accessing the currency creation form
|
||||
Given I am on the dashboard page
|
||||
|
|
@ -36,7 +36,7 @@ Feature: Currency management
|
|||
Given I am on the currency creation page
|
||||
When I press "Create"
|
||||
Then I should still be on the currency creation page
|
||||
And I should see "Please enter exchange rate."
|
||||
And I should see "Please enter exchange rate"
|
||||
|
||||
Scenario: Creating new currency
|
||||
Given I am on the currency creation page
|
||||
|
|
@ -44,11 +44,11 @@ Feature: Currency management
|
|||
And I fill in "Exchange rate" with "0.235654"
|
||||
And I press "Create"
|
||||
Then I should be on the currency index page
|
||||
And I should see "currency has been successfully created."
|
||||
And I should see "currency has been successfully created"
|
||||
|
||||
Scenario: Accessing the currency edit form
|
||||
Given I am on the currency index page
|
||||
When I click "edit" near "US Dollar"
|
||||
When I click "Edit" near "US Dollar"
|
||||
Then I should be editing currency with code "USD"
|
||||
|
||||
Scenario: Updating the currency exchange rate
|
||||
|
|
@ -82,4 +82,4 @@ Feature: Currency management
|
|||
And I fill in "Exchange rate" with "0.235654"
|
||||
And I press "Create"
|
||||
Then I should still be on the currency creation page
|
||||
And I should see "Currency code must be unique."
|
||||
And I should see "Currency code must be unique"
|
||||
|
|
|
|||
|
|
@ -36,27 +36,27 @@ Feature: Managing emails
|
|||
And I fill in "Subject" with "You get a coupon!"
|
||||
And I press "Create"
|
||||
Then I should be editing email with code "promotion_coupon"
|
||||
And I should see "Email has been successfully created."
|
||||
And I should see "Email has been successfully created"
|
||||
|
||||
Scenario: Email codes have to be unique
|
||||
Given I am on the email creation page
|
||||
When I fill in "Code" with "order_confirmation"
|
||||
And I press "Create"
|
||||
Then I should still be on the email creation page
|
||||
And I should see "Email code must be unique."
|
||||
And I should see "Email code must be unique"
|
||||
|
||||
Scenario: Updating the email
|
||||
Given I am on the email index page
|
||||
And I click "edit" near "order_confirmation"
|
||||
And I click "Edit" near "order_confirmation"
|
||||
When I fill in "Subject" with "A great purchase!"
|
||||
And I press "Save changes"
|
||||
Then I should see "Email has been successfully updated."
|
||||
Then I should see "Email has been successfully updated"
|
||||
|
||||
Scenario: Deleting email from list
|
||||
Given I am on the email index page
|
||||
When I click "delete" near "order_confirmation"
|
||||
When I click "Delete" near "order_confirmation"
|
||||
Then I should be on the email index page
|
||||
And I should see "Email has been successfully deleted."
|
||||
And I should see "Email has been successfully deleted"
|
||||
And I should not see email with code "order_confirmation" in that list
|
||||
|
||||
Scenario: Email code is required
|
||||
|
|
@ -64,7 +64,7 @@ Feature: Managing emails
|
|||
When I fill in "Subject" with "You get a coupon!"
|
||||
And I press "Create"
|
||||
Then I should still be on the email creation page
|
||||
And I should see "Please enter email code."
|
||||
And I should see "Please enter email code"
|
||||
|
||||
Scenario: Cannot update email code
|
||||
When I am editing email with code "user_confirmation"
|
||||
|
|
|
|||
|
|
@ -40,7 +40,7 @@ Feature: Cart
|
|||
And I follow "T-Shirts"
|
||||
When I press "Add to cart"
|
||||
Then I should be on the cart summary page
|
||||
And I should see "Item has been added to cart."
|
||||
And I should see "Item has been added to cart"
|
||||
|
||||
Scenario: Adding simple product to cart via product page
|
||||
Given I am on the store homepage
|
||||
|
|
@ -48,7 +48,7 @@ Feature: Cart
|
|||
And I click "Git T-Shirt"
|
||||
When I press "Add to cart"
|
||||
Then I should be on the cart summary page
|
||||
And I should see "Item has been added to cart."
|
||||
And I should see "Item has been added to cart"
|
||||
|
||||
Scenario: Added simple products appear on the cart summary
|
||||
Given I am on the store homepage
|
||||
|
|
@ -100,7 +100,7 @@ Feature: Cart
|
|||
When I select "M" from "Size"
|
||||
And I press "Add to cart"
|
||||
Then I should be on the cart summary page
|
||||
And I should see "Item has been added to cart."
|
||||
And I should see "Item has been added to cart"
|
||||
|
||||
Scenario: Adding product to cart by selecting multiple options
|
||||
Given I am on the store homepage
|
||||
|
|
@ -110,7 +110,7 @@ Feature: Cart
|
|||
And I select "Blue" from "Color"
|
||||
And I press "Add to cart"
|
||||
Then I should be on the cart summary page
|
||||
And I should see "Item has been added to cart."
|
||||
And I should see "Item has been added to cart"
|
||||
|
||||
Scenario: Products added by selecting options appear on the cart summary
|
||||
Given I am on the store homepage
|
||||
|
|
|
|||
|
|
@ -81,4 +81,4 @@ Feature: Checkout addressing
|
|||
And I fill in guest email with "example@example.com"
|
||||
And I press "Proceed with your order"
|
||||
And I press "Continue"
|
||||
Then I should see "Please select country."
|
||||
Then I should see "Please select country"
|
||||
|
|
|
|||
|
|
@ -80,7 +80,7 @@ Feature: Checkout shipping
|
|||
And I fill in the shipping address to United States
|
||||
And I press "Continue"
|
||||
When I press "Continue"
|
||||
Then I should see "Please select shipping method."
|
||||
Then I should see "Please select shipping method"
|
||||
|
||||
Scenario: Shipping costs affect the order total
|
||||
Given I go to the checkout start page
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@ Feature: Reports
|
|||
| Description | Lorem ipsum dolor |
|
||||
And I press "Create"
|
||||
Then I should be on the page of report "Report1"
|
||||
And I should see "Report has been successfully created."
|
||||
And I should see "Report has been successfully created"
|
||||
And I should see 1 result in the list
|
||||
|
||||
Scenario: Adding new report with custom end date option
|
||||
|
|
@ -45,7 +45,7 @@ Feature: Reports
|
|||
And I select "3" from "sylius_report_dataFetcherConfiguration_end_day"
|
||||
And I press "Create"
|
||||
Then I should be on the page of report "Report2"
|
||||
And I should see "Report has been successfully created."
|
||||
And I should see "Report has been successfully created"
|
||||
And I should see 2 results in the list
|
||||
|
||||
Scenario: Adding new report with some custom options
|
||||
|
|
@ -61,7 +61,7 @@ Feature: Reports
|
|||
And I select "month" from "Time period"
|
||||
And I press "Create"
|
||||
Then I should be on the page of report "Report3"
|
||||
And I should see "Report has been successfully created."
|
||||
And I should see "Report has been successfully created"
|
||||
And I should see 1 results in the list
|
||||
|
||||
Scenario: Prevent adding new report with the same code that has been used before
|
||||
|
|
@ -72,7 +72,7 @@ Feature: Reports
|
|||
| Description | Lorem ipsum dolor |
|
||||
And I press "Create"
|
||||
Then I should still be on the report creation page
|
||||
And I should see "This code is already in use."
|
||||
And I should see "This code is already in use"
|
||||
|
||||
Scenario: Prevent adding new report with multiple-word code
|
||||
Given I am on the report creation page
|
||||
|
|
@ -82,27 +82,27 @@ Feature: Reports
|
|||
| Description | Lorem ipsum dolor |
|
||||
And I press "Create"
|
||||
Then I should still be on the report creation page
|
||||
And I should see "Report code should be a single word."
|
||||
And I should see "Report code should be a single word"
|
||||
|
||||
Scenario: Accessing report details page from list
|
||||
Given I am on the report index page
|
||||
When I press "details" near "TableReport"
|
||||
When I press "Details" near "TableReport"
|
||||
Then I should be on the page of report "TableReport"
|
||||
|
||||
Scenario: Accessing report edit form from list
|
||||
Given I am on the report index page
|
||||
When I press "edit" near "TableReport"
|
||||
When I press "Edit" near "TableReport"
|
||||
Then I should be editing report with name "TableReport"
|
||||
|
||||
Scenario: Accessing report with chart renderer details page
|
||||
Given I am on the report index page
|
||||
When I press "details" near "BarChartReport"
|
||||
When I press "Details" near "BarChartReport"
|
||||
Then I should be on the page of report "BarChartReport"
|
||||
And "canvas" should appear on the page
|
||||
|
||||
Scenario: Accessing report edit form from details page
|
||||
Given I am on the page of report "TableReport"
|
||||
When I click "edit"
|
||||
When I click "Edit"
|
||||
Then I should be editing report with name "TableReport"
|
||||
|
||||
Scenario: Updating the report
|
||||
|
|
@ -110,22 +110,22 @@ Feature: Reports
|
|||
When I fill in "Name" with "TableReportEdited"
|
||||
And I fill in "Description" with "Lorem ipsum dolor"
|
||||
And I press "Save changes"
|
||||
Then I should see "Report has been successfully updated."
|
||||
Then I should see "Report has been successfully updated"
|
||||
And "reportEdited" should appear on the page
|
||||
And "Lorem ipsum dolor" should appear on the page
|
||||
|
||||
Scenario: Deleting report from index page
|
||||
Given I am on the report index page
|
||||
When I press "delete" near "TableReport"
|
||||
When I press "Delete" near "TableReport"
|
||||
Then I should be on the report index page
|
||||
And I should see "Report has been successfully deleted."
|
||||
And I should see "Report has been successfully deleted"
|
||||
And I should not see report with name "TableReport" in that list
|
||||
|
||||
Scenario: Deleting report from details page
|
||||
Given I am on the page of report "TableReport"
|
||||
When I press "delete"
|
||||
When I press "Delete"
|
||||
Then I should be on the report index page
|
||||
And I should see "Report has been successfully deleted."
|
||||
And I should see "Report has been successfully deleted"
|
||||
And I should not see report with name "TableReport" in that list
|
||||
|
||||
Scenario: Cannot update report code
|
||||
|
|
@ -139,4 +139,4 @@ Feature: Reports
|
|||
| Description | Lorem ipsum dolor |
|
||||
And I press "Create"
|
||||
Then I should still be on the report creation page
|
||||
And I should see "Report code cannot be blank."
|
||||
And I should see "Report code cannot be blank"
|
||||
|
|
|
|||
|
|
@ -56,28 +56,28 @@ Feature: Permissions management
|
|||
And I select "Manage products catalog" from "Parent"
|
||||
And I press "Create"
|
||||
Then I should be on the permission index page
|
||||
And I should see "Permission has been successfully created."
|
||||
And I should see "Permission has been successfully created"
|
||||
And I should see 13 permissions in the list
|
||||
And I should see permission with code containing "sylius.product.display_sales_stats" in that list
|
||||
|
||||
Scenario: Cannot edit the parent of root node
|
||||
Given I am on the permission index page
|
||||
When I click "edit" near "root"
|
||||
When I click "Edit" near "root"
|
||||
Then I should not see "Parent"
|
||||
|
||||
Scenario: Updating the permission
|
||||
Given I am on the permission index page
|
||||
And I click "edit" near "sylius.product.index"
|
||||
And I click "Edit" near "sylius.product.index"
|
||||
When I fill in "Description" with "Browse all product lists"
|
||||
And I press "Save changes"
|
||||
Then I should be on the permission index page
|
||||
And I should see "Permission has been successfully updated."
|
||||
And I should see "Permission has been successfully updated"
|
||||
And I should see "Browse all product lists"
|
||||
But I should not see "List all products"
|
||||
|
||||
Scenario: Deleting permission
|
||||
Given I am on the permission index page
|
||||
When I click "delete" near "Edit product"
|
||||
When I click "Delete" near "Edit product"
|
||||
Then I should be on the permission index page
|
||||
And I should see "Permission has been successfully deleted."
|
||||
And I should see "Permission has been successfully deleted"
|
||||
And I should not see permission with code containing "sylius.product.edit" in the list
|
||||
|
|
|
|||
|
|
@ -67,7 +67,7 @@ Feature: Hierarchical Role based access control (HRBAC)
|
|||
| Price | 29.99 |
|
||||
And I press "Create"
|
||||
Then I should be on the page of product "Book about Everything"
|
||||
And I should see "Product has been successfully created."
|
||||
And I should see "Product has been successfully created"
|
||||
|
||||
Scenario: Sales Manager cannot create products
|
||||
Given I am logged in as "Sales Manager"
|
||||
|
|
|
|||
|
|
@ -60,27 +60,27 @@ Feature: Roles management
|
|||
And I select "Administrator" from "Parent"
|
||||
And I press "Create"
|
||||
Then I should be on the role index page
|
||||
And I should see "Role has been successfully created."
|
||||
And I should see "Role has been successfully created"
|
||||
And I should see 4 roles in the list
|
||||
And I should see role with name "Salesman" in that list
|
||||
|
||||
Scenario: Cannot edit the parent of root node
|
||||
Given I am on the role index page
|
||||
When I click "edit" near "root"
|
||||
When I click "Edit" near "root"
|
||||
Then I should not see "Parent"
|
||||
|
||||
Scenario: Updating the role
|
||||
Given I am on the role index page
|
||||
And I click "edit" near "sylius.catalog_manager"
|
||||
And I click "Edit" near "sylius.catalog_manager"
|
||||
When I fill in "Description" with "Manage products catalog"
|
||||
And I press "Save changes"
|
||||
Then I should be on the role index page
|
||||
And I should see "Role has been successfully updated."
|
||||
And I should see "Role has been successfully updated"
|
||||
And I should see "Manage products catalog"
|
||||
|
||||
Scenario: Deleting role
|
||||
Given I am on the role index page
|
||||
When I click "delete" near "sylius.catalog_manager"
|
||||
When I click "Delete" near "sylius.catalog_manager"
|
||||
Then I should be on the role index page
|
||||
And I should see "Role has been successfully deleted."
|
||||
And I should see "Role has been successfully deleted"
|
||||
And I should not see role with name "Catalog Manager" in the list
|
||||
|
|
|
|||
|
|
@ -66,7 +66,7 @@ Feature: User account addresses page
|
|||
@javascript
|
||||
Scenario: Deleting an address
|
||||
Given I press "Delete" near "GERMANY"
|
||||
When I click "delete" from the confirmation modal
|
||||
When I click "Delete" from the confirmation modal
|
||||
Then I should see 2 addresses in the list
|
||||
And I should not see "GERMANY"
|
||||
And I should still be on my account addresses page
|
||||
|
|
@ -102,13 +102,13 @@ Feature: User account addresses page
|
|||
Given I press "Set as default billing address" near "AUSTRIA"
|
||||
Then I should not see "No default billing address"
|
||||
And I should see a "#defaultBillingAddress" element near "AUSTRIA"
|
||||
And I should see "Your billing address has been changed."
|
||||
And I should see "Your billing address has been changed"
|
||||
|
||||
Scenario: Setting an address as the default shipping address
|
||||
Given I press "Set as default shipping address" near "POLAND"
|
||||
Then I should not see "No default shipping address"
|
||||
And I should see a "#defaultShippingAddress" element near "POLAND"
|
||||
And I should see "Your shipping address has been changed."
|
||||
And I should see "Your shipping address has been changed"
|
||||
|
||||
Scenario: Showing only enabled countries
|
||||
When I am on my account address creation page
|
||||
|
|
|
|||
|
|
@ -48,7 +48,7 @@ Feature: User account orders page
|
|||
|
||||
Scenario: Viewing the detail of an order
|
||||
Given I am on my account orders page
|
||||
When I click "details" near "000000001"
|
||||
When I click "Details" near "000000001"
|
||||
Then I should see "Details of your order"
|
||||
And I should be on the order show page for 000000001
|
||||
And I should see 2 items in the list
|
||||
|
|
|
|||
|
|
@ -56,4 +56,4 @@ Feature: User account profile edition
|
|||
And I fill in "Last name" with "Doe"
|
||||
And I press "Save changes"
|
||||
Then I should be on my account profile page
|
||||
And I should see "Customer has been successfully updated."
|
||||
And I should see "Customer has been successfully updated"
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ Feature: Forgot password
|
|||
When I fill in "Email" with "bar@foo.com"
|
||||
And I press "Reset"
|
||||
Then I should be redirected to user login page
|
||||
And I should see "If the email you have specified exists in our system, we have sent there an instruction on how to reset your password."
|
||||
And I should see "If the email you have specified exists in our system, we have sent there an instruction on how to reset your password"
|
||||
|
||||
Scenario: Trying to reset password without email
|
||||
Given I am on the sylius user request password reset token page
|
||||
|
|
@ -37,4 +37,4 @@ Feature: Forgot password
|
|||
And I fill in "Email" with "foo@foo.com"
|
||||
When I press "Reset"
|
||||
Then I should be redirected to user login page
|
||||
And I should see "If the email you have specified exists in our system, we have sent there an instruction on how to reset your password."
|
||||
And I should see "If the email you have specified exists in our system, we have sent there an instruction on how to reset your password"
|
||||
|
|
|
|||
|
|
@ -56,30 +56,30 @@ Feature: Customers management
|
|||
|
||||
Scenario: Accessing the customer details page from customers list
|
||||
Given I am on the customer index page
|
||||
When I click "details" near "john@foo.com"
|
||||
When I click "Details" near "john@foo.com"
|
||||
Then I should be on the page of customer with email "john@foo.com"
|
||||
And I should see 1 orders in the list
|
||||
|
||||
Scenario: Prevent self-deletion possibility for current logged user on details page
|
||||
Given I am on the customer index page
|
||||
When I click "details" near "sylius@example.com"
|
||||
When I click "Details" near "sylius@example.com"
|
||||
Then I should be on the page of customer with email "sylius@example.com"
|
||||
And I should not see "delete" button
|
||||
And I should not see "Delete" button
|
||||
|
||||
Scenario: Prevent self-deletion possibility for current logged customer on customer index page
|
||||
Given I am on the customer index page
|
||||
Then I should not see "delete" button near "sylius@example.com" in "customers" table
|
||||
Then I should not see "Delete" button near "sylius@example.com" in "customers" table
|
||||
|
||||
Scenario: Accessing the customer creation form
|
||||
Given I am on the customer index page
|
||||
When I follow "create customer"
|
||||
When I follow "Create customer"
|
||||
Then I should be on the customer creation page
|
||||
|
||||
Scenario: Submitting empty form
|
||||
Given I am on the customer creation page
|
||||
When I press "Create"
|
||||
Then I should still be on the customer creation page
|
||||
And I should see "Please enter your first name."
|
||||
And I should see "Please enter your first name"
|
||||
|
||||
Scenario: Creating customer
|
||||
Given I am on the customer creation page
|
||||
|
|
@ -90,16 +90,16 @@ Feature: Customers management
|
|||
| Email | umpirsky@gmail.com |
|
||||
And I press "Create"
|
||||
Then I should be on the page of customer with email "umpirsky@gmail.com"
|
||||
And I should see "Customer has been successfully created."
|
||||
And I should see "Customer has been successfully created"
|
||||
|
||||
Scenario: Accessing the customer editing form
|
||||
Given I am on the page of customer with email "rick@foo.com"
|
||||
When I follow "edit"
|
||||
When I follow "Edit"
|
||||
Then I should be editing customer with email "rick@foo.com"
|
||||
|
||||
Scenario: Accessing the editing form from the list
|
||||
Given I am on the customer index page
|
||||
When I click "edit" near "rick@foo.com"
|
||||
When I click "Edit" near "rick@foo.com"
|
||||
Then I should be editing customer with email "rick@foo.com"
|
||||
|
||||
Scenario: Updating the customer
|
||||
|
|
@ -107,7 +107,7 @@ Feature: Customers management
|
|||
When I fill in "Email" with "umpirsky@gmail.com"
|
||||
And I press "Save changes"
|
||||
Then I should be on the page of customer with email "umpirsky@gmail.com"
|
||||
And "Customer has been successfully updated." should appear on the page
|
||||
And "Customer has been successfully updated" should appear on the page
|
||||
And "umpirsky@gmail.com" should appear on the page
|
||||
|
||||
Scenario: Changing customer's password and logging in with new one
|
||||
|
|
@ -123,32 +123,32 @@ Feature: Customers management
|
|||
Given I deleted customer with email "rick@foo.com"
|
||||
And I am on the customer index page
|
||||
And I view deleted elements
|
||||
When I click "details" near "rick@foo.com"
|
||||
When I click "Details" near "rick@foo.com"
|
||||
Then I should be on the page of customer with email "rick@foo.com"
|
||||
And I should see 1 orders in the list
|
||||
|
||||
Scenario: Deleting customer
|
||||
Given I am on the page of customer with email "rick@foo.com"
|
||||
When I press "delete"
|
||||
When I press "Delete"
|
||||
Then I should see "Do you want to delete this item"
|
||||
When I press "delete"
|
||||
When I press "Delete"
|
||||
Then I should be on the customer index page
|
||||
And I should see "Customer has been successfully deleted."
|
||||
And I should see "Customer has been successfully deleted"
|
||||
|
||||
@javascript
|
||||
Scenario: Deleting customer
|
||||
Given I am on the page of customer with email "rick@foo.com"
|
||||
When I press "delete"
|
||||
And I click "delete" from the confirmation modal
|
||||
When I press "Delete"
|
||||
And I click "Delete" from the confirmation modal
|
||||
Then I should be on the customer index page
|
||||
And I should see "Customer has been successfully deleted."
|
||||
And I should see "Customer has been successfully deleted"
|
||||
And I should not see customer with email "rick@foo.com" in that list
|
||||
|
||||
@javascript
|
||||
Scenario: Deleting customer from the list
|
||||
Given I am on the customer index page
|
||||
When I click "delete" near "rick@foo.com"
|
||||
And I click "delete" from the confirmation modal
|
||||
When I click "Delete" near "rick@foo.com"
|
||||
And I click "Delete" from the confirmation modal
|
||||
Then I should still be on the customer index page
|
||||
And "Customer has been successfully deleted." should appear on the page
|
||||
And "Customer has been successfully deleted" should appear on the page
|
||||
But I should not see customer with email "rick@foo.com" in that list
|
||||
|
|
|
|||
|
|
@ -703,7 +703,7 @@ class WebContext extends DefaultContext
|
|||
public function permalinkOfTaxonInTaxonomyHasBeenChangedTo($taxon, $taxonomy, $newPermalink)
|
||||
{
|
||||
$this->iAmOnTheResourcePage('taxonomy', 'name', $taxonomy);
|
||||
$this->iClickNear('edit', $taxon);
|
||||
$this->iClickNear('Edit', $taxon);
|
||||
$this->fillField('Permalink', $newPermalink);
|
||||
$this->pressButton('Save changes');
|
||||
}
|
||||
|
|
|
|||
|
|
@ -626,7 +626,7 @@ class WebContext extends BaseWebContext implements SnippetAcceptingContext
|
|||
|
||||
$column = null;
|
||||
foreach ($rows as $key => $row) {
|
||||
if ($row->getText() === $property) {
|
||||
if (strtolower(trim($row->getText())) === strtolower(trim($property))) {
|
||||
$column = $key;
|
||||
break;
|
||||
}
|
||||
|
|
@ -646,22 +646,32 @@ class WebContext extends BaseWebContext implements SnippetAcceptingContext
|
|||
}
|
||||
|
||||
/**
|
||||
* @Then I should see table of :id sorted by lastName
|
||||
* @Then I should see the orders list sorted by customers' last names
|
||||
*/
|
||||
public function iShouldSeeTableSortedByLastName($id)
|
||||
public function iShouldSeeOrdersListSortedByLastName()
|
||||
{
|
||||
$allNames = $this->getSession()->getPage()->findAll('css', '#'.$id.' > tbody > tr > td > p');
|
||||
$allSurnames = array();
|
||||
/** @var NodeElement[] $nameElements */
|
||||
$nameElements = $this->getSession()->getPage()->findAll('css', '#orders > tbody > tr > td > p');
|
||||
|
||||
foreach ($allNames as $name) {
|
||||
$spacePosition = strpos($name->getText(), ' ');
|
||||
$surname = substr($name->getText(), $spacePosition + 1);
|
||||
$allSurnames[] .= $surname;
|
||||
$lastNames = [];
|
||||
foreach ($nameElements as $nameElement) {
|
||||
$lastNames[] = substr($nameElement->getText(), strrpos($nameElement->getText(), ' ') + 1);
|
||||
}
|
||||
|
||||
sort($allSurnames);
|
||||
$sortedLastNames = $lastNames;
|
||||
sort($sortedLastNames);
|
||||
|
||||
$this->assertSession()->elementTextContains('css', '#'.$id.' > tbody > tr > td > p', $allSurnames[0]);
|
||||
if (array_values($sortedLastNames) === array_values($lastNames)) {
|
||||
return;
|
||||
}
|
||||
|
||||
throw new \InvalidArgumentException(sprintf(
|
||||
'Orders should be sorted by customers\' last names.' . PHP_EOL .
|
||||
'The customers last names were found in the following order: %s' . PHP_EOL .
|
||||
'Expected: %s',
|
||||
implode(', ', $lastNames),
|
||||
implode(', ', $sortedLastNames)
|
||||
));
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue