@webship-js/magento-steps 0.0.0-stage → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +399 -2
- package/package.json +66 -4
- package/scripts/build-site.sh +190 -0
- package/scripts/site-accounts.php +119 -0
- package/tests/features/01-admin-session.feature +35 -0
- package/tests/features/02-admin-menu-pages.feature +54 -0
- package/tests/features/03-admin-permissions.feature +51 -0
- package/tests/features/04-admin-grids.feature +97 -0
- package/tests/features/05-admin-products.feature +87 -0
- package/tests/features/06-admin-categories.feature +44 -0
- package/tests/features/07-admin-orders.feature +95 -0
- package/tests/features/08-admin-customers.feature +55 -0
- package/tests/features/09-admin-cart-price-rules.feature +49 -0
- package/tests/features/10-admin-content.feature +63 -0
- package/tests/features/11-admin-configuration-cache.feature +46 -0
- package/tests/features/12-admin-reviews-newsletter.feature +66 -0
- package/tests/features/20-storefront-catalog.feature +64 -0
- package/tests/features/21-storefront-search.feature +40 -0
- package/tests/features/22-storefront-product-cart.feature +68 -0
- package/tests/features/23-storefront-checkout.feature +65 -0
- package/tests/features/24-storefront-customer.feature +93 -0
- package/tests/features/25-storefront-wishlist-compare-contact.feature +50 -0
- package/tests/features/90-assertions-must-fail.feature +165 -0
- package/tests/fixtures/pixel.png +0 -0
- package/tests/step-definitions/README.md +36 -0
- package/tests/step-definitions/magento-admin-content.steps.js +818 -0
- package/tests/step-definitions/magento-admin.steps.js +856 -0
- package/tests/step-definitions/magento-helpers.js +992 -0
- package/tests/step-definitions/magento-storefront.steps.js +1797 -0
- package/tests/step-definitions/magento.steps.js +158 -0
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
@admin @catalog @categories
|
|
2
|
+
Feature: Categories in the admin panel
|
|
3
|
+
As a store administrator
|
|
4
|
+
I want to arrange the categories in a tree
|
|
5
|
+
So that customers find the products by kind
|
|
6
|
+
|
|
7
|
+
Background:
|
|
8
|
+
Given I am logged in to the admin panel as "admin"
|
|
9
|
+
|
|
10
|
+
Scenario: The tree holds the categories of the catalog
|
|
11
|
+
Given I am on the "categories" admin page
|
|
12
|
+
Then I should see the "Gear" category in the tree
|
|
13
|
+
And I should see the "Bags" category in the tree
|
|
14
|
+
And I should see the "Women" category in the tree
|
|
15
|
+
But I should not see the "Webship Test Category" category in the tree
|
|
16
|
+
|
|
17
|
+
Scenario: Selecting a category opens its form
|
|
18
|
+
When I select the "Gear" category in the tree
|
|
19
|
+
Then the "Category Name" form field should be "Gear"
|
|
20
|
+
And the "Enable Category" form field should be "on"
|
|
21
|
+
|
|
22
|
+
@critical
|
|
23
|
+
Scenario: A subcategory is added and deleted
|
|
24
|
+
Given there is no category "Webship Test Category"
|
|
25
|
+
When I select the "Gear" category in the tree
|
|
26
|
+
And I click the "Add Subcategory" page action
|
|
27
|
+
Then the admin page title should be "New Category"
|
|
28
|
+
When I set the "Category Name" form field to "Webship Test Category"
|
|
29
|
+
And I save the form
|
|
30
|
+
Then I should see the success message "You saved the category."
|
|
31
|
+
And I should see the "Webship Test Category" category in the tree
|
|
32
|
+
# The store menu shows it under Gear once the cache is fresh.
|
|
33
|
+
When I select the "Webship Test Category" category in the tree
|
|
34
|
+
And I click the "Delete" page action
|
|
35
|
+
Then I should see the confirmation "Are you sure you want to delete this category?"
|
|
36
|
+
When I confirm the action
|
|
37
|
+
Then I should see the success message "You deleted the category."
|
|
38
|
+
And I should not see the "Webship Test Category" category in the tree
|
|
39
|
+
|
|
40
|
+
Scenario: A category needs a name
|
|
41
|
+
When I select the "Gear" category in the tree
|
|
42
|
+
And I click the "Add Subcategory" page action
|
|
43
|
+
And I save the form
|
|
44
|
+
Then I should see the form error "This is a required field." for the "Category Name" field
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
@admin @storefront @orders
|
|
2
|
+
Feature: Orders, from the checkout to the back office
|
|
3
|
+
As a store administrator
|
|
4
|
+
I want every order of the store in the admin panel
|
|
5
|
+
So that I invoice, ship, refund or cancel it
|
|
6
|
+
|
|
7
|
+
@critical
|
|
8
|
+
Scenario: A guest order is found in the admin panel and taken through its life
|
|
9
|
+
# The store: a guest buys a bag with the offline methods.
|
|
10
|
+
Given I am on "/joust-duffle-bag.html"
|
|
11
|
+
When I add the product to the cart
|
|
12
|
+
Then I should see the success message "You added Joust Duffle Bag to your shopping cart."
|
|
13
|
+
When I go to the checkout
|
|
14
|
+
And I fill in the checkout email with "gail.guest@example.com"
|
|
15
|
+
And I fill in the shipping address:
|
|
16
|
+
| First Name | Gail |
|
|
17
|
+
| Last Name | Guest |
|
|
18
|
+
| Street Address | 1 Test Lane |
|
|
19
|
+
| Country | United States |
|
|
20
|
+
| State/Province | Texas |
|
|
21
|
+
| City | Austin |
|
|
22
|
+
| Zip/Postal Code | 78701 |
|
|
23
|
+
| Phone Number | 5125550111 |
|
|
24
|
+
And I choose the "Flat Rate" shipping method
|
|
25
|
+
And I continue to the payment step
|
|
26
|
+
Then the checkout should be on the payment step
|
|
27
|
+
When I choose the "Check / Money order" payment method
|
|
28
|
+
And I place the order
|
|
29
|
+
Then I should see the order confirmation
|
|
30
|
+
And I should see "Thank you for your purchase!"
|
|
31
|
+
And the mini cart should show 0 items
|
|
32
|
+
# The back office: the order is there.
|
|
33
|
+
Given I am logged in to the admin panel as "admin"
|
|
34
|
+
Then I should see the last placed order in the orders grid
|
|
35
|
+
When I open the last placed order in the admin panel
|
|
36
|
+
Then the order status should be "Pending"
|
|
37
|
+
And I should see "gail.guest@example.com"
|
|
38
|
+
And I should see "Flat Rate - Fixed"
|
|
39
|
+
And I should see "Check / Money order"
|
|
40
|
+
# Comments and the status history.
|
|
41
|
+
When I add the order comment "Checked by the test suite"
|
|
42
|
+
Then I should see the order comment "Checked by the test suite"
|
|
43
|
+
But I should not see the order comment "Never written"
|
|
44
|
+
# Hold and release.
|
|
45
|
+
When I put the order on hold
|
|
46
|
+
Then the order status should be "On Hold"
|
|
47
|
+
When I release the order from hold
|
|
48
|
+
Then the order status should be "Pending"
|
|
49
|
+
# Invoice, ship, refund.
|
|
50
|
+
When I invoice the order
|
|
51
|
+
Then the order status should be "Processing"
|
|
52
|
+
When I open the "Invoices" admin tab
|
|
53
|
+
Then the grid should have 1 row
|
|
54
|
+
When I open the "Information" admin tab
|
|
55
|
+
And I ship the order
|
|
56
|
+
Then the order status should be "Complete"
|
|
57
|
+
When I open the "Shipments" admin tab
|
|
58
|
+
Then the grid should have 1 row
|
|
59
|
+
When I open the "Information" admin tab
|
|
60
|
+
And I refund the order
|
|
61
|
+
Then the order status should be "Closed"
|
|
62
|
+
When I open the "Credit Memos" admin tab
|
|
63
|
+
Then the grid should have 1 row
|
|
64
|
+
When I go to the "orders" admin page
|
|
65
|
+
Then I should see the "Gail Guest" grid row
|
|
66
|
+
|
|
67
|
+
Scenario: A customer order is cancelled in the admin panel and the customer sees it
|
|
68
|
+
Given I am logged in as the customer "customer"
|
|
69
|
+
And my cart is empty
|
|
70
|
+
And I am on "/radiant-tee.html"
|
|
71
|
+
When I choose the "Size" option "M"
|
|
72
|
+
And I choose the "Color" option "Blue"
|
|
73
|
+
And I add the product to the cart
|
|
74
|
+
And I go to the checkout
|
|
75
|
+
And I choose the "Free Shipping" shipping method
|
|
76
|
+
And I continue to the payment step
|
|
77
|
+
And I choose the "Check / Money order" payment method
|
|
78
|
+
And I place the order
|
|
79
|
+
Then I should see the order confirmation
|
|
80
|
+
And my order history should list the last placed order as "Pending"
|
|
81
|
+
Given I am logged in to the admin panel as "sales"
|
|
82
|
+
When I open the last placed order in the admin panel
|
|
83
|
+
Then the order status should be "Pending"
|
|
84
|
+
And I should see "customer@example.com"
|
|
85
|
+
When I cancel the order
|
|
86
|
+
Then the order status should be "Canceled"
|
|
87
|
+
And my order history should list the last placed order as "Canceled"
|
|
88
|
+
|
|
89
|
+
Scenario: An order that does not exist is not found
|
|
90
|
+
Given I am logged in to the admin panel as "admin"
|
|
91
|
+
And I am on the "orders" admin page
|
|
92
|
+
When I search the grid for "999999999"
|
|
93
|
+
Then the grid should show 0 records
|
|
94
|
+
And I should not see the "999999999" grid row
|
|
95
|
+
And I clear the grid filters
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
@admin @customers
|
|
2
|
+
Feature: Customers in the admin panel
|
|
3
|
+
As a store administrator
|
|
4
|
+
I want to view and change the customers
|
|
5
|
+
So that their accounts stay correct
|
|
6
|
+
|
|
7
|
+
Background:
|
|
8
|
+
Given I am logged in to the admin panel as "admin"
|
|
9
|
+
|
|
10
|
+
@critical
|
|
11
|
+
Scenario: A customer is viewed
|
|
12
|
+
When I open the customer "customer@example.com" in the admin panel
|
|
13
|
+
Then the admin page title should be "Casey Customer"
|
|
14
|
+
And I should see "Customer Group:"
|
|
15
|
+
And I should see "General"
|
|
16
|
+
And I should see "100 Main Street"
|
|
17
|
+
|
|
18
|
+
Scenario: The account information of a customer is changed and set back
|
|
19
|
+
When I open the customer "customer@example.com" in the admin panel
|
|
20
|
+
And I open the "Account Information" admin tab
|
|
21
|
+
Then the "First Name" form field should be "Casey"
|
|
22
|
+
And the "Email" form field should be "customer@example.com"
|
|
23
|
+
And the "Group" form field should be "General"
|
|
24
|
+
When I set the "Middle Name/Initial" form field to "Q"
|
|
25
|
+
And I click the "Save and Continue Edit" page action
|
|
26
|
+
Then I should see the success message "You saved the customer."
|
|
27
|
+
When I open the "Account Information" admin tab
|
|
28
|
+
Then the "Middle Name/Initial" form field should be "Q"
|
|
29
|
+
When I set the "Middle Name/Initial" form field to ""
|
|
30
|
+
And I save the form
|
|
31
|
+
Then I should see the success message "You saved the customer."
|
|
32
|
+
And the admin page title should be "Customers"
|
|
33
|
+
|
|
34
|
+
Scenario: The addresses of a customer are listed
|
|
35
|
+
When I open the customer "customer@example.com" in the admin panel
|
|
36
|
+
And I open the "Addresses" admin tab
|
|
37
|
+
Then I should see "Default Billing Address"
|
|
38
|
+
And I should see "Default Shipping Address"
|
|
39
|
+
And I should see the "100 Main Street" grid row
|
|
40
|
+
And the "City" column of the "100 Main Street" grid row should be "Austin"
|
|
41
|
+
And the "State" column of the "100 Main Street" grid row should be "Texas"
|
|
42
|
+
|
|
43
|
+
Scenario: A customer needs an email
|
|
44
|
+
When I open the customer "shopper@example.com" in the admin panel
|
|
45
|
+
And I open the "Account Information" admin tab
|
|
46
|
+
And I set the "Email" form field to ""
|
|
47
|
+
And I save the form
|
|
48
|
+
Then I should see the form error "This is a required field." for the "Email" field
|
|
49
|
+
|
|
50
|
+
Scenario: The customer groups are listed
|
|
51
|
+
Given I am on the "customer groups" admin page
|
|
52
|
+
Then I should see the "General" grid row
|
|
53
|
+
And I should see the "Wholesale" grid row
|
|
54
|
+
And I should see the "NOT LOGGED IN" grid row
|
|
55
|
+
And the "Tax Class" column of the "Wholesale" grid row should be "Retail Customer"
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
@admin @storefront @promotions
|
|
2
|
+
Feature: A cart price rule with a coupon
|
|
3
|
+
As a store administrator
|
|
4
|
+
I want to give a discount for a coupon code
|
|
5
|
+
So that customers with the code pay less
|
|
6
|
+
|
|
7
|
+
Scenario: A rule needs a name
|
|
8
|
+
Given I am logged in to the admin panel as "admin"
|
|
9
|
+
And I am on the "new cart price rule" admin page
|
|
10
|
+
When I save the form
|
|
11
|
+
Then I should see the form error "This is a required field." for the "Rule Name" field
|
|
12
|
+
|
|
13
|
+
@critical
|
|
14
|
+
Scenario: A coupon is created, used in the cart, cancelled and removed
|
|
15
|
+
Given I am logged in to the admin panel as "admin"
|
|
16
|
+
And there is no cart price rule "Webship Test Rule"
|
|
17
|
+
And I am on the "new cart price rule" admin page
|
|
18
|
+
When I set the "Rule Name" form field to "Webship Test Rule"
|
|
19
|
+
And I set the "Websites" form field to "Main Website"
|
|
20
|
+
And I set the "Customer Groups" form field to "NOT LOGGED IN, General"
|
|
21
|
+
And I set the "Coupon" form field to "Specific Coupon"
|
|
22
|
+
And I set the "Coupon Code" form field to "WSTEST10"
|
|
23
|
+
And I open the "Actions" form section
|
|
24
|
+
And I set the "Apply" form field to "Percent of product price discount"
|
|
25
|
+
And I set the "Discount Amount" form field to "10"
|
|
26
|
+
And I save the form
|
|
27
|
+
Then I should see the success message "You saved the rule."
|
|
28
|
+
When I filter the grid by "Rule" with "Webship Test Rule"
|
|
29
|
+
Then the "Coupon Code" column of the "Webship Test Rule" grid row should be "WSTEST10"
|
|
30
|
+
And the "Status" column of the "Webship Test Rule" grid row should be "Active"
|
|
31
|
+
# The store: the code takes ten percent off.
|
|
32
|
+
Given I am on "/joust-duffle-bag.html"
|
|
33
|
+
When I add the product to the cart
|
|
34
|
+
And I go to the cart
|
|
35
|
+
Then the cart subtotal should be "$34.00"
|
|
36
|
+
When I apply the coupon "WSTEST10"
|
|
37
|
+
Then I should see the success message "You used coupon code "
|
|
38
|
+
And the cart discount should be "-$3.40"
|
|
39
|
+
And the cart order total should be "$30.60"
|
|
40
|
+
When I cancel the coupon
|
|
41
|
+
Then I should see the success message "You canceled the coupon code."
|
|
42
|
+
And the cart order total should be "$34.00"
|
|
43
|
+
When I apply the coupon "NOT-A-CODE"
|
|
44
|
+
Then I should see the error message "is not valid."
|
|
45
|
+
And the cart order total should be "$34.00"
|
|
46
|
+
# The clean-up.
|
|
47
|
+
Given there is no cart price rule "Webship Test Rule"
|
|
48
|
+
When I go to the "cart price rules" admin page
|
|
49
|
+
Then I should not see the "Webship Test Rule" grid row
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
@admin @content
|
|
2
|
+
Feature: Pages and blocks in the admin panel
|
|
3
|
+
As a store administrator
|
|
4
|
+
I want to write the content pages of the store
|
|
5
|
+
So that customers read about it
|
|
6
|
+
|
|
7
|
+
Background:
|
|
8
|
+
Given I am logged in to the admin panel as "admin"
|
|
9
|
+
|
|
10
|
+
Scenario: The pages of the store are listed
|
|
11
|
+
Given I am on the "pages" admin page
|
|
12
|
+
Then I should see the "Home Page" grid row
|
|
13
|
+
And the "URL Key" column of the "Home Page" grid row should be "home"
|
|
14
|
+
And the "Status" column of the "Home Page" grid row should be "Enabled"
|
|
15
|
+
And I should see the "404 Not Found" grid row
|
|
16
|
+
|
|
17
|
+
Scenario: A page needs a title
|
|
18
|
+
Given I am on the "new page" admin page
|
|
19
|
+
When I save the form
|
|
20
|
+
Then I should see the form error "This is a required field." for the "Page Title" field
|
|
21
|
+
|
|
22
|
+
@critical
|
|
23
|
+
Scenario: A page is created, read in the store, changed and deleted
|
|
24
|
+
Given there is no page "Webship Test Page"
|
|
25
|
+
And I am on the "new page" admin page
|
|
26
|
+
When I set the "Page Title" form field to "Webship Test Page"
|
|
27
|
+
And I open the "Content" form section
|
|
28
|
+
And I set the "Content Heading" form field to "A heading from the test suite"
|
|
29
|
+
And I open the "Search Engine Optimization" form section
|
|
30
|
+
And I set the "URL Key" form field to "webship-test-page"
|
|
31
|
+
And I save the form
|
|
32
|
+
Then I should see the success message "You saved the page."
|
|
33
|
+
And the admin page title should be "Webship Test Page"
|
|
34
|
+
When I go to "/webship-test-page"
|
|
35
|
+
Then I should see "A heading from the test suite"
|
|
36
|
+
And the breadcrumbs should be "Home > Webship Test Page"
|
|
37
|
+
# Disable it: the store answers with the "not found" page.
|
|
38
|
+
When I go to the "pages" admin page
|
|
39
|
+
And I search the grid for "Webship Test Page"
|
|
40
|
+
And I open the "Webship Test Page" grid row
|
|
41
|
+
Then the admin page title should be "Webship Test Page"
|
|
42
|
+
When I turn the "Enable Page" form switch off
|
|
43
|
+
And I save the form
|
|
44
|
+
Then I should see the success message "You saved the page."
|
|
45
|
+
When I go to "/webship-test-page"
|
|
46
|
+
Then I should not see "A heading from the test suite"
|
|
47
|
+
Given there is no page "Webship Test Page"
|
|
48
|
+
When I go to the "pages" admin page
|
|
49
|
+
And I search the grid for "Webship Test Page"
|
|
50
|
+
Then the grid should show 0 records
|
|
51
|
+
And I clear the grid filters
|
|
52
|
+
|
|
53
|
+
Scenario: A block of the sample content is opened
|
|
54
|
+
Given I am on the "blocks" admin page
|
|
55
|
+
When I search the grid for "footer_links_block"
|
|
56
|
+
Then I should see the "Footer Links Block" grid row
|
|
57
|
+
When I open the "Footer Links Block" grid row
|
|
58
|
+
Then the admin page title should be "Footer Links Block"
|
|
59
|
+
And the "Block Title" form field should be "Footer Links Block"
|
|
60
|
+
And the "Identifier" form field should be "footer_links_block"
|
|
61
|
+
And the "Enable Block" form field should be "on"
|
|
62
|
+
When I go to the "blocks" admin page
|
|
63
|
+
Then I should see the "Footer Links Block" grid row
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
@admin @configuration
|
|
2
|
+
Feature: Configuration, cache and index state
|
|
3
|
+
As a store administrator
|
|
4
|
+
I want to change a setting and keep the caches and indexes valid
|
|
5
|
+
So that the store shows what I configured
|
|
6
|
+
|
|
7
|
+
Background:
|
|
8
|
+
Given I am logged in to the admin panel as "admin"
|
|
9
|
+
|
|
10
|
+
@critical
|
|
11
|
+
Scenario: A setting is changed, the cache is flushed, the setting is set back
|
|
12
|
+
Given I am on the "general" configuration section
|
|
13
|
+
When I set the "Store Name" configuration field of "Store Information" to "Webship Test Store"
|
|
14
|
+
And I save the form
|
|
15
|
+
Then I should see the success message "You saved the configuration."
|
|
16
|
+
And the "Store Name" configuration field of "Store Information" should be "Webship Test Store"
|
|
17
|
+
# A saved setting invalidates cache types: the suite reads the state and flushes.
|
|
18
|
+
And some cache types should be invalidated
|
|
19
|
+
When I flush the cache
|
|
20
|
+
Then no cache type should be invalidated
|
|
21
|
+
Given I am on the "general" configuration section
|
|
22
|
+
When I set the "Store Name" configuration field of "Store Information" to ""
|
|
23
|
+
And I save the form
|
|
24
|
+
Then I should see the success message "You saved the configuration."
|
|
25
|
+
And the "Store Name" configuration field of "Store Information" should be ""
|
|
26
|
+
When I flush the cache
|
|
27
|
+
Then no cache type should be invalidated
|
|
28
|
+
|
|
29
|
+
Scenario: The cache types are listed with their state
|
|
30
|
+
Given I am on the "cache management" admin page
|
|
31
|
+
Then I should see the "Configuration" grid row
|
|
32
|
+
And I should see the "Page Cache" grid row
|
|
33
|
+
And the "Tags" column of the "Page Cache" grid row should be "FPC"
|
|
34
|
+
|
|
35
|
+
Scenario: Invalid indexes are rebuilt and every index is ready
|
|
36
|
+
# Deleting a category (the categories feature does) leaves two indexes on "REINDEX REQUIRED": the admin panel
|
|
37
|
+
# has no reindex button, the suite rebuilds them through the command of cucumber.js.
|
|
38
|
+
When I rebuild the invalid indexes
|
|
39
|
+
Then every index should be ready
|
|
40
|
+
And the "Status" column of the "Catalog Search" grid row should be "READY"
|
|
41
|
+
And the "Mode" column of the "Catalog Search" grid row should be "UPDATE ON SAVE"
|
|
42
|
+
|
|
43
|
+
Scenario: A select of the configuration is read
|
|
44
|
+
Given I am on the "contact" configuration section
|
|
45
|
+
Then the "Enable Contact Us" configuration field of "Contact Us" should be "Yes"
|
|
46
|
+
And the "Enable Contact Us" configuration field of "Contact Us" should not be "No"
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
@admin @storefront @reviews
|
|
2
|
+
Feature: Reviews and newsletter subscribers, from the store to the back office
|
|
3
|
+
As a store administrator
|
|
4
|
+
I want to moderate what customers send
|
|
5
|
+
So that the store shows approved reviews only
|
|
6
|
+
|
|
7
|
+
@critical
|
|
8
|
+
Scenario: A customer review is approved in the admin panel and shows in the store
|
|
9
|
+
Given I am logged in to the admin panel as "admin"
|
|
10
|
+
And there is no review "Webship test review"
|
|
11
|
+
And I am logged in as the customer "customer"
|
|
12
|
+
And I am on "/push-it-messenger-bag.html"
|
|
13
|
+
When I review the product with 4 stars, the summary "Webship test review" and the text "It holds everything I carry."
|
|
14
|
+
Then I should see the success message "You submitted your review for moderation."
|
|
15
|
+
# Pending: not in the store yet.
|
|
16
|
+
When I go to "/push-it-messenger-bag.html"
|
|
17
|
+
And I open the "Reviews" product tab
|
|
18
|
+
Then I should not see "Webship test review"
|
|
19
|
+
When I go to the "pending reviews" admin page
|
|
20
|
+
And I filter the grid by "Title" with "Webship test review"
|
|
21
|
+
Then I should see the "Webship test review" grid row
|
|
22
|
+
And the "Nickname" column of the "Webship test review" grid row should be "Casey"
|
|
23
|
+
When I open the "Webship test review" grid row
|
|
24
|
+
Then the admin page title should be "Edit Review"
|
|
25
|
+
When I set the "Status" form field to "Approved"
|
|
26
|
+
And I save the form
|
|
27
|
+
Then I should see the success message "You saved the review."
|
|
28
|
+
When I go to the "reviews" admin page
|
|
29
|
+
And I filter the grid by "Title" with "Webship test review"
|
|
30
|
+
Then the "Status" column of the "Webship test review" grid row should be "Approved"
|
|
31
|
+
When I flush the cache
|
|
32
|
+
And I go to "/push-it-messenger-bag.html"
|
|
33
|
+
And I open the "Reviews" product tab
|
|
34
|
+
Then I should see "Webship test review"
|
|
35
|
+
And I should see "It holds everything I carry."
|
|
36
|
+
Given there is no review "Webship test review"
|
|
37
|
+
When I flush the cache
|
|
38
|
+
And I go to "/push-it-messenger-bag.html"
|
|
39
|
+
And I open the "Reviews" product tab
|
|
40
|
+
Then I should not see "Webship test review"
|
|
41
|
+
|
|
42
|
+
Scenario: A review needs a rating
|
|
43
|
+
Given I am on "/push-it-messenger-bag.html"
|
|
44
|
+
When I review the product without a rating, the summary "No stars" and the text "Forgot the stars." as "Gail"
|
|
45
|
+
Then I should see the field error "Please select one of each of the ratings above."
|
|
46
|
+
And I should not see a success message
|
|
47
|
+
|
|
48
|
+
Scenario: A newsletter subscription reaches the admin panel
|
|
49
|
+
Given I am logged in to the admin panel as "admin"
|
|
50
|
+
And there is no newsletter subscriber "reader@example.com"
|
|
51
|
+
And I am on the homepage
|
|
52
|
+
When I subscribe "reader@example.com" to the newsletter
|
|
53
|
+
Then I should see the success message "Thank you for your subscription."
|
|
54
|
+
When I go to the "newsletter subscribers" admin page
|
|
55
|
+
And I filter the grid by "Email" with "reader@example.com"
|
|
56
|
+
Then the "Status" column of the "reader@example.com" grid row should be "Subscribed"
|
|
57
|
+
And the "Type" column of the "reader@example.com" grid row should be "Guest"
|
|
58
|
+
Given there is no newsletter subscriber "reader@example.com"
|
|
59
|
+
When I go to the "newsletter subscribers" admin page
|
|
60
|
+
Then I should not see the "reader@example.com" grid row
|
|
61
|
+
|
|
62
|
+
Scenario: The newsletter form refuses a wrong address
|
|
63
|
+
Given I am on the homepage
|
|
64
|
+
When I subscribe "not-an-email" to the newsletter
|
|
65
|
+
Then I should see the field error "Please enter a valid email address (Ex: johndoe@domain.com)."
|
|
66
|
+
And I should not see a success message
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
@storefront @catalog
|
|
2
|
+
Feature: The catalog of the store
|
|
3
|
+
As a visitor
|
|
4
|
+
I want to browse the categories
|
|
5
|
+
So that I find a product to buy
|
|
6
|
+
|
|
7
|
+
@critical
|
|
8
|
+
Scenario: The menu leads to a category
|
|
9
|
+
Given I am on the homepage
|
|
10
|
+
When I open the "Gear > Bags" store menu item
|
|
11
|
+
Then I should see "Bags"
|
|
12
|
+
And the breadcrumbs should be "Home > Gear > Bags"
|
|
13
|
+
And the product list should have 14 products
|
|
14
|
+
And I should see the product "Joust Duffle Bag" in the product list
|
|
15
|
+
But I should not see the product "Radiant Tee" in the product list
|
|
16
|
+
|
|
17
|
+
Scenario: A top-level menu entry opens its category
|
|
18
|
+
Given I am on the homepage
|
|
19
|
+
When I open the "Gear" store menu item
|
|
20
|
+
Then the breadcrumbs should be "Home > Gear"
|
|
21
|
+
|
|
22
|
+
Scenario: The layered navigation filters the list
|
|
23
|
+
Given I am on "/gear/bags.html"
|
|
24
|
+
When I filter the product list by "Activity" with "Yoga"
|
|
25
|
+
Then the product list should be filtered by "Activity" with "Yoga"
|
|
26
|
+
And the product list should have 6 products
|
|
27
|
+
And the product list should not be filtered by "Activity" with "Gym"
|
|
28
|
+
When I clear the product list filters
|
|
29
|
+
Then the product list should not be filtered by "Activity" with "Yoga"
|
|
30
|
+
And the product list should have 14 products
|
|
31
|
+
|
|
32
|
+
Scenario: The list is sorted by price in both directions
|
|
33
|
+
Given I am on "/gear/bags.html"
|
|
34
|
+
When I sort the product list by "Price"
|
|
35
|
+
Then the product list should be ordered by price ascending
|
|
36
|
+
When I set the product list direction to descending
|
|
37
|
+
Then the product list should be ordered by price descending
|
|
38
|
+
When I sort the product list by "Product Name"
|
|
39
|
+
And I set the product list direction to ascending
|
|
40
|
+
Then the product list should be ordered by name ascending
|
|
41
|
+
|
|
42
|
+
Scenario: The list is shown as a grid or as a list
|
|
43
|
+
Given I am on "/gear/bags.html"
|
|
44
|
+
Then the product list should be shown as a grid
|
|
45
|
+
When I view the product list as a list
|
|
46
|
+
Then the product list should be shown as a list
|
|
47
|
+
When I view the product list as a grid
|
|
48
|
+
Then the product list should be shown as a grid
|
|
49
|
+
|
|
50
|
+
Scenario: The list is paged
|
|
51
|
+
Given I am on "/gear/bags.html"
|
|
52
|
+
Then the product list should be on page 1
|
|
53
|
+
When I go to the next page of the product list
|
|
54
|
+
Then the product list should be on page 2
|
|
55
|
+
When I go to the previous page of the product list
|
|
56
|
+
Then the product list should be on page 1
|
|
57
|
+
When I go to page 2 of the product list
|
|
58
|
+
Then the product list should be on page 2
|
|
59
|
+
|
|
60
|
+
Scenario: A product is opened from the list
|
|
61
|
+
Given I am on "/gear/bags.html"
|
|
62
|
+
When I open the product "Joust Duffle Bag" from the product list
|
|
63
|
+
Then the breadcrumbs should be "Home > Gear > Bags > Joust Duffle Bag"
|
|
64
|
+
And the product price should be "$34.00"
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
@storefront @search
|
|
2
|
+
Feature: Searching the store
|
|
3
|
+
As a visitor
|
|
4
|
+
I want to search for a product
|
|
5
|
+
So that I do not have to browse
|
|
6
|
+
|
|
7
|
+
@critical
|
|
8
|
+
Scenario: A search lists the matching products
|
|
9
|
+
Given I am on the homepage
|
|
10
|
+
When I search the store for "yoga"
|
|
11
|
+
Then I should see "Search results for: 'yoga'"
|
|
12
|
+
And the breadcrumbs should be "Home > Search results for: 'yoga'"
|
|
13
|
+
And I should see the product "Cronus Yoga Pant" in the product list
|
|
14
|
+
But I should not see the product "Joust Duffle Bag" in the product list
|
|
15
|
+
|
|
16
|
+
Scenario: A search by SKU finds the product
|
|
17
|
+
Given I am on the homepage
|
|
18
|
+
When I search the store for "24-MB01"
|
|
19
|
+
Then I should see "Search results for: '24-MB01'"
|
|
20
|
+
And I should see the product "Joust Duffle Bag" in the product list
|
|
21
|
+
|
|
22
|
+
Scenario: A search without a match says so
|
|
23
|
+
Given I am on the homepage
|
|
24
|
+
When I search the store for "zzzqqqxxx"
|
|
25
|
+
Then I should see the notice message "Your search returned no results."
|
|
26
|
+
|
|
27
|
+
Scenario: The search box suggests the terms people searched for
|
|
28
|
+
Given I am on the homepage
|
|
29
|
+
When I search the store for "yoga"
|
|
30
|
+
And I go to the homepage
|
|
31
|
+
And I type "yog" in the store search
|
|
32
|
+
Then I should see the search suggestion "yoga"
|
|
33
|
+
But I should not see the search suggestion "zzzqqqxxx"
|
|
34
|
+
|
|
35
|
+
Scenario: The results are filtered and sorted like a category
|
|
36
|
+
Given I am on the homepage
|
|
37
|
+
When I search the store for "yoga"
|
|
38
|
+
And I sort the product list by "Price"
|
|
39
|
+
And I set the product list direction to ascending
|
|
40
|
+
Then the product list should be ordered by price ascending
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
@storefront @cart
|
|
2
|
+
Feature: The product page and the cart
|
|
3
|
+
As a visitor
|
|
4
|
+
I want to put products in my cart
|
|
5
|
+
So that I can buy them together
|
|
6
|
+
|
|
7
|
+
@critical
|
|
8
|
+
Scenario: A simple product is added to the cart
|
|
9
|
+
Given I am on "/joust-duffle-bag.html"
|
|
10
|
+
Then the product price should be "$34.00"
|
|
11
|
+
And the mini cart should show 0 items
|
|
12
|
+
When I add the product to the cart
|
|
13
|
+
Then I should see the success message "You added Joust Duffle Bag to your shopping cart."
|
|
14
|
+
And the mini cart should show 1 item
|
|
15
|
+
When I open the mini cart
|
|
16
|
+
Then the mini cart should contain "Joust Duffle Bag"
|
|
17
|
+
But the mini cart should not contain "Radiant Tee"
|
|
18
|
+
|
|
19
|
+
Scenario: A configurable product needs its options
|
|
20
|
+
Given I am on "/radiant-tee.html"
|
|
21
|
+
When I add the product to the cart
|
|
22
|
+
Then I should see the field error "This is a required field."
|
|
23
|
+
And I should not see a success message
|
|
24
|
+
And the mini cart should show 0 items
|
|
25
|
+
|
|
26
|
+
Scenario: A configurable product is added with its options and a quantity
|
|
27
|
+
Given I am on "/radiant-tee.html"
|
|
28
|
+
When I choose the "Size" option "M"
|
|
29
|
+
And I choose the "Color" option "Blue"
|
|
30
|
+
Then the "Size" option should be "M"
|
|
31
|
+
And the "Color" option should be "Blue"
|
|
32
|
+
And the "Color" option should not be "Orange"
|
|
33
|
+
When I set the product quantity to 2
|
|
34
|
+
And I add the product to the cart
|
|
35
|
+
Then I should see the success message "You added Radiant Tee to your shopping cart."
|
|
36
|
+
And the mini cart should show 2 items
|
|
37
|
+
When I go to the cart
|
|
38
|
+
Then the cart should contain "Radiant Tee"
|
|
39
|
+
And the cart quantity of "Radiant Tee" should be 2
|
|
40
|
+
And I should see "Blue" in the "#shopping-cart-table" element
|
|
41
|
+
|
|
42
|
+
Scenario: The cart is updated, estimated and emptied
|
|
43
|
+
Given I am on "/joust-duffle-bag.html"
|
|
44
|
+
When I add the product to the cart
|
|
45
|
+
And I go to the cart
|
|
46
|
+
Then the cart should contain "Joust Duffle Bag"
|
|
47
|
+
And the cart subtotal should be "$34.00"
|
|
48
|
+
When I change the cart quantity of "Joust Duffle Bag" to 3
|
|
49
|
+
Then the cart quantity of "Joust Duffle Bag" should be 3
|
|
50
|
+
And the cart subtotal should be "$102.00"
|
|
51
|
+
When I estimate shipping to "United States", "Texas", "78701"
|
|
52
|
+
And I choose the "Flat Rate" shipping method
|
|
53
|
+
Then the cart shipping should be "$15.00"
|
|
54
|
+
And the cart order total should be "$117.00"
|
|
55
|
+
When I choose the "Free Shipping" shipping method
|
|
56
|
+
Then the cart shipping should be "$0.00"
|
|
57
|
+
And the cart order total should be "$102.00"
|
|
58
|
+
When I remove "Joust Duffle Bag" from the cart
|
|
59
|
+
Then the cart should not contain "Joust Duffle Bag"
|
|
60
|
+
And I should see "You have no items in your shopping cart."
|
|
61
|
+
|
|
62
|
+
Scenario: A wrong coupon code is refused
|
|
63
|
+
Given I am on "/joust-duffle-bag.html"
|
|
64
|
+
When I add the product to the cart
|
|
65
|
+
And I go to the cart
|
|
66
|
+
And I apply the coupon "NOT-A-CODE"
|
|
67
|
+
Then I should see the error message "is not valid."
|
|
68
|
+
And the cart order total should be "$34.00"
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
@storefront @checkout
|
|
2
|
+
Feature: The checkout
|
|
3
|
+
As a visitor or a customer
|
|
4
|
+
I want to place an order with the offline methods
|
|
5
|
+
So that the store ships my products
|
|
6
|
+
|
|
7
|
+
Scenario: The shipping step asks for the address
|
|
8
|
+
Given I am on "/joust-duffle-bag.html"
|
|
9
|
+
When I add the product to the cart
|
|
10
|
+
And I go to the checkout
|
|
11
|
+
And I choose the "Flat Rate" shipping method
|
|
12
|
+
And I continue to the payment step
|
|
13
|
+
Then the checkout should be on the shipping step
|
|
14
|
+
And I should see the field error "This is a required field." for "First Name"
|
|
15
|
+
And I should see the field error "This is a required field." for "Last Name"
|
|
16
|
+
And I should see the field error "This is a required field." for "City"
|
|
17
|
+
And I should see the field error "This is a required field." for "Phone Number"
|
|
18
|
+
|
|
19
|
+
@critical
|
|
20
|
+
Scenario: A guest orders with free shipping and a money order
|
|
21
|
+
Given I am on "/aim-analog-watch.html"
|
|
22
|
+
When I add the product to the cart
|
|
23
|
+
And I go to the checkout
|
|
24
|
+
And I fill in the checkout email with "gary.guest@example.com"
|
|
25
|
+
And I fill in the shipping address:
|
|
26
|
+
| First Name | Gary |
|
|
27
|
+
| Last Name | Guest |
|
|
28
|
+
| Company | Test Company |
|
|
29
|
+
| Street Address | 22 Checkout Road |
|
|
30
|
+
| Country | United States |
|
|
31
|
+
| State/Province | California |
|
|
32
|
+
| City | San Francisco |
|
|
33
|
+
| Zip/Postal Code | 94105 |
|
|
34
|
+
| Phone Number | 4155550122 |
|
|
35
|
+
And I choose the "Free Shipping" shipping method
|
|
36
|
+
And I continue to the payment step
|
|
37
|
+
Then the checkout should be on the payment step
|
|
38
|
+
And I should see "22 Checkout Road"
|
|
39
|
+
And I should see "Free Shipping - Free"
|
|
40
|
+
When I choose the "Check / Money order" payment method
|
|
41
|
+
And I place the order
|
|
42
|
+
Then I should see the order confirmation
|
|
43
|
+
And I should see "gary.guest@example.com"
|
|
44
|
+
And the mini cart should show 0 items
|
|
45
|
+
|
|
46
|
+
Scenario: A customer orders with a saved address
|
|
47
|
+
Given I am logged in as the customer "shopper"
|
|
48
|
+
And my cart is empty
|
|
49
|
+
And I am on "/joust-duffle-bag.html"
|
|
50
|
+
When I add the product to the cart
|
|
51
|
+
And I go to the checkout
|
|
52
|
+
Then I should see "200 Market Street"
|
|
53
|
+
When I choose the "Flat Rate" shipping method
|
|
54
|
+
And I continue to the payment step
|
|
55
|
+
And I choose the "Check / Money order" payment method
|
|
56
|
+
And I place the order
|
|
57
|
+
Then I should see the order confirmation
|
|
58
|
+
And my order history should list the last placed order as "Pending"
|
|
59
|
+
And my cart is empty
|
|
60
|
+
|
|
61
|
+
Scenario: An empty cart has no checkout
|
|
62
|
+
Given I am on the cart
|
|
63
|
+
Then I should see "You have no items in your shopping cart."
|
|
64
|
+
When I go to "/checkout/"
|
|
65
|
+
Then I should see "Shopping Cart"
|