9 use Magento\Checkout\Test\Page\CheckoutOnepage;
10 use Magento\Mtf\Constraint\AbstractConstraint;
27 if ($isShippingAvailable) {
28 \PHPUnit\Framework\Assert::assertTrue(
29 $checkoutOnepage->getShippingMethodBlock()->isLoaderAppeared(),
30 'Shipping rate has not been changed.' 33 $shippingAvailability = $isShippingAvailable ?
'available' :
'unavailable';
34 \PHPUnit\Framework\Assert::assertEquals(
36 $checkoutOnepage->getShippingMethodBlock()->isShippingMethodAvailable(
$shippingMethod),
37 "Shipping rates for {$shippingMethod['shipping_service']} should be $shippingAvailability." 48 return "Shipping rate has been changed.";
processAssert(CheckoutOnepage $checkoutOnepage, $shippingMethod, $isShippingAvailable)