Skip to content

Commit

Permalink
[Behat] Fixes in behat
Browse files Browse the repository at this point in the history
  • Loading branch information
GSadee committed Sep 15, 2016
1 parent eb34ea0 commit ec7cd59
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ Feature: Modifying a customer's shipping address on an order with an applied cou

@ui
Scenario: Modifying a customer's shipping address when the applied coupon is no longer valid
Given the coupon "HOLIDAY" was used
Given the coupon "HOLIDAY" was used up to its usage limit
When I view the summary of the order "#00000001"
And I want to modify a customer's shipping address of this order
And I specify their shipping address as "Los Angeles", "Seaside Fwy", "90802", "United States" for "Lucifer Morningstar"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Feature: Modifying a customer's shipping address of an order with a different cu
And the store has "DHL" shipping method with "$20.00" fee within "EN" zone
And the store has a product "Suit" priced at "$400.00"
And there is a customer "mike@ross.com" that placed an order "#00000001"
And the customer chose "GBP" currency
And the customer have chosen to order in the "GBP" currency
And the customer bought a single "Suit"
And the customer "Mike Ross" addressed it to "350 5th Ave", "10118" "New York" in the "United States" with identical billing address
And the customer chose "DHL" shipping method with "Cash on Delivery" payment
Expand Down
2 changes: 1 addition & 1 deletion src/Sylius/Behat/Context/Setup/PromotionContext.php
Original file line number Diff line number Diff line change
Expand Up @@ -455,7 +455,7 @@ public function thePromotionWasDisabledForTheChannel(PromotionInterface $promoti
}

/**
* @Given /^the (coupon "[^"]+") was used$/
* @Given /^the (coupon "[^"]+") was used up to its usage limit$/
*/
public function theCouponWasUsed(CouponInterface $coupon)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,10 +79,10 @@ public function chooseCountry($country)
*/
public function specifyShippingAddress($city, $street, $postcode, $country, $firstAndLastName)
{
$customerName = explode(' ', $firstAndLastName);
$this->specifyFirstName($customerName[0]);
if (1 < count($customerName)) {
$this->specifyLastName($customerName[1]);
$customerNames = explode(' ', $firstAndLastName);
$this->specifyFirstName($customerNames[0]);
if (1 < count($customerNames)) {
$this->specifyLastName($customerNames[1]);
}

$this->specifyStreet($street);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ default:
- sylius.behat.context.setup.product
- sylius.behat.context.setup.promotion
- sylius.behat.context.setup.admin_security
- sylius.behat.context.setup.shop_security
- sylius.behat.context.setup.shipping
- sylius.behat.context.setup.taxation
- sylius.behat.context.setup.taxonomy
Expand Down

0 comments on commit ec7cd59

Please sign in to comment.