/** * Fill Sales Data. * * @return array */ public function run() { $this->orderCreateIndex->getCreateBlock()->submitOrder(); $this->salesOrderView->getMessagesBlock()->waitSuccessMessage(); $orderId = trim($this->salesOrderView->getTitleBlock()->getTitle(), '#'); $order = $this->fixtureFactory->createByCode('orderInjectable', ['data' => ['id' => $orderId, 'customer_id' => ['customer' => $this->customer], 'entity_id' => ['products' => $this->products], 'billing_address_id' => ['billingAddress' => $this->billingAddress]]]); return ['orderId' => $orderId, 'order' => $order]; }
/** * Assert that after cancel sales order successful message appears * * @param SalesOrderView $salesOrderView * @return void */ public function processAssert(SalesOrderView $salesOrderView) { \PHPUnit_Framework_Assert::assertEquals(self::SUCCESS_CANCEL_MESSAGE, $salesOrderView->getMessagesBlock()->getSuccessMessage()); }
/** * Assert that after create sales order successful message appears * * @param SalesOrderView $salesOrderView * @return void */ public function processAssert(SalesOrderView $salesOrderView) { \PHPUnit_Framework_Assert::assertEquals(self::SUCCESS_MESSAGE, $salesOrderView->getMessagesBlock()->getSuccessMessage(), 'Wrong success message is displayed.'); }