/** * Fill shipping address * * @param Checkout $fixture * @return void */ public function fillShipping(Checkout $fixture) { $shippingAddress = $fixture->getShippingAddress(); if (!$shippingAddress) { return; } $this->fill($shippingAddress); $this->_rootElement->find($this->continue, Locator::SELECTOR_CSS)->click(); $this->waitForElementNotVisible($this->waitElement); }
/** * Get id for placed order * * @param Checkout $fixture * @return string */ public function getOrderId(Checkout $fixture) { $continueShopping = $this->_rootElement->find($this->continueShopping); $this->_rootElement->waitUntil(function () use($continueShopping) { return $continueShopping->isVisible() ? true : null; }); if ($fixture->getCustomer()) { return $this->_rootElement->find($this->orderId, Locator::SELECTOR_CSS)->getText(); } else { return $this->getGuestOrderId(); } }