/** * Check that clicking "Place order" without setting checkbox for agreement will result in error message displayed * under condition. * * @param CheckoutMultishippingOverview $checkoutMultishippingOverview * @param TestStepFactory $stepFactory * @param Customer $customer * @param CheckoutAgreement $checkoutAgreement * @param string $products * @param array $payment * @param array $shippingData * @param array $fillItemsData * @param string $newAddresses * @return void */ public function processAssert(CheckoutMultishippingOverview $checkoutMultishippingOverview, TestStepFactory $stepFactory, Customer $customer, CheckoutAgreement $checkoutAgreement, $products, array $payment, array $shippingData, array $fillItemsData, $newAddresses) { $this->stepFactory = $stepFactory; $customer->persist(); $products = $this->createProducts($products); $this->login($customer); $this->addToCart($products); $this->startCheckout(); $this->processCheckoutWithMultishipping($customer, $products, $fillItemsData, $shippingData, $payment, $newAddresses); $alertText = $checkoutMultishippingOverview->getOverviewBlock()->clickContinue(); \PHPUnit_Framework_Assert::assertEquals(self::NOTIFICATION_MESSAGE, $alertText, 'Notification required message of Terms and Conditions is absent.'); $checkoutMultishippingOverview->getOverviewBlock()->setAgreement($checkoutAgreement, 'Yes'); $checkoutMultishippingOverview->getOverviewBlock()->clickContinue(); }
/** * Place order with multishipping. * * @return mixed */ public function run() { $this->checkoutMultishippingOverview->getOverviewBlock()->clickPlaceOrder(); $ordersIds = $this->checkoutMultishippingSuccess->getSuccessBlock()->getOrdersIds(); return ['ordersIds' => $ordersIds]; }