/**
  * Process checkout with multishipping.
  *
  * @param Customer $customer
  * @param array $products
  * @param array $fillItemsData
  * @param array $shippingData
  * @param array $payment
  * @param string $newAddresses
  * @return void
  */
 protected function processCheckoutWithMultishipping(Customer $customer, array $products, array $fillItemsData, array $shippingData, array $payment, $newAddresses)
 {
     $newAddresses = $this->stepFactory->create('\\Mage\\Customer\\Test\\TestStep\\CreateNewAddressesFixturesStep', ['newAddresses' => $newAddresses])->run()['newAddresses'];
     $addresses = $this->stepFactory->create('\\Mage\\Checkout\\Test\\TestStep\\EnterNewAddressesStep', ['newAddresses' => $newAddresses, 'customer' => $customer])->run()['addresses'];
     $addresses = $this->stepFactory->create('\\Mage\\Checkout\\Test\\TestStep\\SelectAddressesStep', ['products' => $products, 'customer' => $customer, 'fillItemsData' => $fillItemsData, 'addresses' => $addresses])->run()['addresses'];
     $this->stepFactory->create('\\Mage\\Checkout\\Test\\TestStep\\FillShippingMethodWithMultishippingStep', ['shippingData' => $shippingData, 'addresses' => $addresses])->run();
     $this->stepFactory->create('\\Mage\\Checkout\\Test\\TestStep\\SelectPaymentMethodWithMultishippingStep', ['payment' => $payment])->run();
 }
 /**
  * Check that clicking "Place order" without setting checkbox for agreement will result in error message displayed
  * under condition.
  *
  * @param MultishippingCheckoutOverview $page
  * @param TestStepFactory $stepFactory
  * @param array $products
  * @param array $payment
  * @param array $shipping
  * @return void
  */
 public function processAssert(MultishippingCheckoutOverview $page, TestStepFactory $stepFactory, $products, $payment, $shipping)
 {
     $customer = ['customer' => ['dataset' => 'johndoe_with_multiple_addresses']];
     $customer = $stepFactory->create('\\Magento\\Customer\\Test\\TestStep\\CreateCustomerStep', $customer)->run();
     $products = $stepFactory->create('\\Magento\\Catalog\\Test\\TestStep\\CreateProductsStep', ['products' => $products])->run();
     $stepFactory->create('\\Magento\\Customer\\Test\\TestStep\\LoginCustomerOnFrontendStep', $customer)->run();
     $stepFactory->create('\\Magento\\Checkout\\Test\\TestStep\\AddProductsToTheCartStep', $products)->run();
     $stepFactory->create('\\Magento\\Multishipping\\Test\\TestStep\\ProceedToMultipleAddressCheckoutStep')->run();
     $stepFactory->create('\\Magento\\Multishipping\\Test\\TestStep\\FillCustomerAddressesStep', array_merge($products, $customer))->run();
     $stepFactory->create('\\Magento\\Multishipping\\Test\\TestStep\\FillShippingInformationStep', array_merge(['shippingMethod' => $shipping], $customer))->run();
     $stepFactory->create('\\Magento\\Multishipping\\Test\\TestStep\\SelectPaymentMethodStep', ['payment' => $payment])->run();
     $stepFactory->create('\\Magento\\CheckoutAgreements\\Test\\TestStep\\CheckTermOnMultishippingStep', ['agreementValue' => 'No'])->run();
     $stepFactory->create('\\Magento\\Multishipping\\Test\\TestStep\\PlaceOrderStep')->run();
     \PHPUnit_Framework_Assert::assertEquals(self::NOTIFICATION_MESSAGE, $page->getAgreementReview()->getNotificationMassage(), 'Notification required message of Terms and Conditions is absent.');
     $stepFactory->create('\\Magento\\CheckoutAgreements\\Test\\TestStep\\CheckTermOnMultishippingStep', ['agreementValue' => 'Yes'])->run();
     $stepFactory->create('\\Magento\\Multishipping\\Test\\TestStep\\PlaceOrderStep')->run();
 }