8 use Magento\Mtf\Constraint\AbstractConstraint;
9 use Magento\Mtf\ObjectManager;
10 use Magento\Multishipping\Test\Page\MultishippingCheckoutOverview;
11 use Magento\Mtf\TestStep\TestStepFactory;
40 MultishippingCheckoutOverview
$page,
41 TestStepFactory $stepFactory,
46 $customer = [
'customer' => [
'dataset' =>
'johndoe_with_multiple_addresses']];
49 \
Magento\Catalog\Test\TestStep\CreateProductsStep::class,
52 $stepFactory->create(\
Magento\Customer\Test\TestStep\LoginCustomerOnFrontendStep::class,
$customer)->run();
53 $stepFactory->create(\
Magento\Checkout\Test\TestStep\AddProductsToTheCartStep::class,
$products)->run();
54 $stepFactory->create(\
Magento\Multishipping\Test\TestStep\ProceedToMultipleAddressCheckoutStep::class)->run();
56 \
Magento\Multishipping\Test\TestStep\FillCustomerAddressesStep::class,
60 \
Magento\Multishipping\Test\TestStep\FillShippingInformationStep::class,
61 array_merge([
'shippingMethod' => $shipping],
$customer)
64 \
Magento\Multishipping\Test\TestStep\SelectPaymentMethodStep::class,
68 \
Magento\CheckoutAgreements\Test\TestStep\CheckTermOnMultishippingStep::class,
69 [
'agreementValue' =>
'No']
71 $stepFactory->create(\
Magento\Multishipping\Test\TestStep\PlaceOrderStep::class)->run();
72 \PHPUnit\Framework\Assert::assertEquals(
73 self::NOTIFICATION_MESSAGE,
74 $page->getAgreementReview()->getNotificationMassage(),
75 'Notification required message of Terms and Conditions is absent.' 78 \
Magento\CheckoutAgreements\Test\TestStep\CheckTermOnMultishippingStep::class,
79 [
'agreementValue' =>
'Yes']
81 $stepFactory->create(\
Magento\Multishipping\Test\TestStep\PlaceOrderStep::class)->run();
91 return 'Validation error message for terms and conditions checkbox is present on multishipping checkout.';
const NOTIFICATION_MESSAGE
processAssert(MultishippingCheckoutOverview $page, TestStepFactory $stepFactory, $products, $payment, $shipping)