Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
@house_number_address_book
Feature: Adding a new address to the book
In order to have saved addresses on my account
As a Customer
I want to be able to add a new address to address book

Background:
Given the store operates on a single channel in "United States"
And I am a logged in customer

@ui
Scenario: Adding address to address book with addition
When I want to add a new address to my address book
And I specify the address as "Lucifer Morningstar", "Seaside Fwy", "12", "A", "90802", "Los Angeles", "United States", "Arkansas"
And I add it
Then I should be notified that the address has been successfully added
And the address assigned to "Lucifer Morningstar" should appear in my book

@ui
Scenario: Adding address to address book without addition
When I want to add a new address to my address book
And I specify the address as "Lucifer Morningstar", "Seaside Fwy", "44", "", "90802", "Los Angeles", "United States", "Arkansas"
And I add it
Then I should be notified that the address has been successfully added
And the address assigned to "Lucifer Morningstar" should appear in my book
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
@house_number_address_book
Feature: Seeing validation messages during address addition
In order to be sure that the address I'm trying to add is correct
As a Customer
I want to be prevented from adding invalid addresses

Background:
Given the store operates on a single channel in "United States"
And I am a logged in customer

@ui @javascript
Scenario: The street number needs to be entered
When I want to add a new address to my address book
And I specify the address as "Lucifer Morningstar", "Seaside Fwy", "90802", "Los Angeles", "United States", "Arkansas"
And I add it
Then I should still be on the address addition page
Then I should be notified that the street number is required
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
@house_number_address_book
Feature: Making changes in existing addresses
In order to keep my address information up to date
As a Customer
I want to be able to edit my addresses

Background:
Given the store operates on a single channel in "United States"
And I am a logged in customer
And I have an address "Lucifer Morningstar", "Seaside Fwy", "12", "a", "90802", "Los Angeles", "United States", "Arkansas" in my address book

@ui
Scenario: Inability to edit not my addresses
Given there is a customer "John Doe" identified by an email "doe@example.com" and a password "banana"
And this customer has an address "John Doe", "Banana Street", "8", "x", "90232", "New York", "United States", "Kansas" in their address book
When I try to edit the address of "John Doe"
Then I should be unable to edit their address

@ui
Scenario: Changing the names on my address
Given I am editing the address of "Lucifer Morningstar"
When I change the first name to "Stephanie"
And I change the last name to "Edgley"
And I save my changed address
Then I should be notified that the address has been successfully updated
And I should still have a single address in my address book
And this address should be assigned to "Stephanie Edgley"

@ui
Scenario: Changing my location
Given I am editing the address of "Lucifer Morningstar"
When I change the street to "Vildegard Av"
And I change the number to "8"
And I change the addition to "b"
And I change the city to "Liverpool"
And I change the postcode to "GBA-20B"
And I save my changed address
Then I should be notified that the address has been successfully updated
And I should still have a single address in my address book
And it should contain "Vildegard Av"
And it should contain "Liverpool"
And it should contain "GBA-20B"
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
@house_number_address_book
Feature: Viewing my address book
In order to see all my addresses
As a Customer
I want to be able to browse my address book

Background:
Given the store operates on a single channel in "United States"
And I am a logged in customer

@ui
Scenario: Viewing all addresses
Given I have an address "Lucifer Morningstar", "Seaside Fwy", "4", "a", "90802", "Los Angeles", "United States", "Arkansas" in my address book
When I browse my address book
Then I should have a single address in my address book

@ui
Scenario: Inability to view the addresses of other customers
Given there is a customer "John Doe" identified by an email "doe@example.com" and a password "banana"
And this customer has an address "John Doe", "Banana Street", "8", "y", "90232", "New York", "United States", "Kansas" in their address book
And I have an address "Lucifer Morningstar", "Seaside Fwy", "4", "c", "90802", "Los Angeles", "United States", "Arkansas" in my address book
When I browse my address book
Then I should have a single address in my address book
And this address should be assigned to "Lucifer Morningstar"
And I should not see the address assigned to "John Doe"
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
@house_number_address_book
Feature: Viewing addresses created after checkout
In order to see all my addresses
As a Customer
I want to be able to browse my address book

Background:
Given the store operates on a single channel in "United States"
And the store has a product "PHP T-Shirt" priced at "$19.99"
And the store ships everywhere for free
And the store allows paying offline
And I am a logged in customer
And I have an address "Lucifer Morningstar", "Seaside Fwy", "102", "b", "90802", "Los Angeles", "United States", "Arkansas" in my address book
And my default address is of "Lucifer Morningstar"

@ui
Scenario: Viewing address created after placing an order
Given I have product "PHP T-Shirt" in the cart
And I am at the checkout addressing step
When I specify the first and last name as "Mike Ross" for shipping address
And I complete the addressing step
And I proceed with "Free" shipping method and "Offline" payment
And I confirm my order
And I browse my address book
Then I should have 2 addresses in my address book
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
@house_number_customer_account
Feature: Viewing details of an order
In order to check some details of my placed order
As an Customer
I want to be able to view details of my placed order

Background:
Given the store operates on a single channel in "United States"
And the store has a product "Angel T-Shirt" priced at "$39.00"
And the store ships everywhere for free
And the store allows paying with "Cash on Delivery"
And I am a logged in customer
And I placed an order "#00000666"
And I bought a single "Angel T-Shirt"
And I addressed it to "Lucifer Morningstar", "Seaside Fwy", "12", "a", "90802" "Los Angeles" in the "United States"
And for the billing address of "Mazikeen Lilim" in the "Pacific Coast Hwy", "4", "b", "90806" "Los Angeles", "United States"
And I chose "Free" shipping method with "Cash on Delivery" payment

@ui
Scenario: Viewing basic information about an order
When I view the summary of the order "#00000666"
And it should has number "#00000666"
And I should see "Lucifer Morningstar", "12", "a", "Seaside Fwy", "90802", "Los Angeles", "United States" as shipping address
And I should see "Mazikeen Lilim", "4", "b", "Pacific Coast Hwy", "90806", "Los Angeles", "United States" as billing address
And I should see "$39.00" as order's total
71 changes: 71 additions & 0 deletions tests/Behat/Resources/suites.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,3 +61,74 @@ default:
- sylius.behat.context.ui.shop.locale
filters:
tags: "@house_number_checkout && @ui"

house_number_plugin__address_book:
contexts_services:
- sylius.behat.context.hook.doctrine_orm

- sylius.behat.context.transform.address
- sylius.behat.context.transform.customer
- sylius.behat.context.transform.lexical
- sylius.behat.context.transform.product
- sylius.behat.context.transform.shared_storage
- sylius.behat.context.transform.user

- sylius.behat.context.setup.address
- sylius.behat.context.setup.channel
- sylius.behat.context.setup.customer
- sylius.behat.context.setup.geographical
- sylius.behat.context.setup.payment
- sylius.behat.context.setup.product
- sylius.behat.context.setup.shipping
- sylius.behat.context.setup.shop_security
- sylius.behat.context.setup.user

- sylius.behat.context.ui.shop.address_book
- sylius.behat.context.ui.shop.cart
- sylius.behat.context.ui.shop.checkout
- sylius.behat.context.ui.shop.checkout.addressing
- sylius.behat.context.ui.shop.checkout.complete
filters:
tags: "@house_number_address_book && @ui"

house_number_customer_account:
contexts_services:
- sylius.behat.context.hook.doctrine_orm
- sylius.behat.context.hook.email_spool

- sylius.behat.context.transform.address
- sylius.behat.context.transform.channel
- sylius.behat.context.transform.country
- sylius.behat.context.transform.customer
- sylius.behat.context.transform.lexical
- sylius.behat.context.transform.order
- sylius.behat.context.transform.payment
- sylius.behat.context.transform.product
- sylius.behat.context.transform.shared_storage
- sylius.behat.context.transform.shipping_method
- sylius.behat.context.transform.user
- sylius.behat.context.transform.zone

- sylius.behat.context.setup.channel
- sylius.behat.context.setup.currency
- sylius.behat.context.setup.customer
- sylius.behat.context.setup.geographical
- sylius.behat.context.setup.order
- sylius.behat.context.setup.payment
- sylius.behat.context.setup.product
- sylius.behat.context.setup.shop_security
- sylius.behat.context.setup.shipping
- sylius.behat.context.setup.user
- sylius.behat.context.setup.zone

- sylius.behat.context.ui.channel
- sylius.behat.context.ui.shop.account
- sylius.behat.context.ui.shop.cart
- sylius.behat.context.ui.shop.checkout
- sylius.behat.context.ui.shop.checkout.addressing
- sylius.behat.context.ui.shop.checkout.shipping
- sylius.behat.context.ui.shop.checkout.payment
- sylius.behat.context.ui.shop.checkout.complete
- sylius.behat.context.ui.shop.currency
filters:
tags: "@house_number_customer_account && @ui"