Skip to content
Merged
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
Expand Up @@ -91,13 +91,24 @@ public function selectShippingMethod(array $method)
* @param array $method
* @return bool
*/
public function isShippingMethodAvaiable(array $method)
public function isShippingMethodAvailable(array $method)
{
$this->waitForShippingRates();
$selector = sprintf($this->shippingMethod, $method['shipping_method'], $method['shipping_service']);
return $this->_rootElement->find($selector, Locator::SELECTOR_XPATH)->isVisible();
}

/**
* @deprecated
* @see isShippingMethodAvailable
* @param array $method
* @return bool
*/
public function isShippingMethodAvaiable(array $method)
{
return $this->isShippingMethodAvailable($method);
}

/**
* Click continue button.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,10 @@ public function processAssert(CheckoutOnepage $checkoutOnepage, $shippingMethod,
'Shipping rate has not been changed.'
);
}
$shippingAvailability = $isShippingAvailable ? 'avaiable' : 'unavailable';
$shippingAvailability = $isShippingAvailable ? 'available' : 'unavailable';
\PHPUnit_Framework_Assert::assertEquals(
$isShippingAvailable,
$checkoutOnepage->getShippingMethodBlock()->isShippingMethodAvaiable($shippingMethod),
$checkoutOnepage->getShippingMethodBlock()->isShippingMethodAvailable($shippingMethod),
"Shipping rates for {$shippingMethod['shipping_service']} should be $shippingAvailability."
);
}
Expand Down