[Checkout][Behat] Add placing an order as guest scenario

This commit is contained in:
Arminek 2016-07-07 13:56:54 +02:00
parent 15a4bb7c3b
commit 3c2771b1fd
2 changed files with 23 additions and 1 deletions

View file

@ -0,0 +1,21 @@
@paying_for_order
Feature: Paying offline during checkout as guest
In order to pay with cash or by external means
As a Guest
I want to be able to complete checkout process without paying
Background:
Given the store operates on a single channel in "France"
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
@ui
Scenario: Successfully placing an order
Given I have product "PHP T-Shirt" in the cart
When I complete addressing step with email "john@example.com" and "France" as shipping country
And I select "Free" shipping method
And I complete the shipping step
And I choose "Offline" payment method
And I confirm my order
Then I should see the thank you page

View file

@ -856,8 +856,9 @@ final class CheckoutContext implements Context
*/
public function iCompleteAddressingStepWithEmail($email, AddressInterface $address)
{
$this->iSpecifiedTheShippingAddress($address);
$this->addressingPage->open();
$this->iSpecifyTheEmail($email);
$this->iSpecifyTheShippingAddressAs($address);
$this->iCompleteTheAddressingStep();
}