public function afterUpgrade($before) { $this->shop->getBackOfficeNavigator()->login(); $om = $this->shop->getOrderManager()->visit($before['id_order']); $this->writeArtefact('simple-order-after-upgrade.pdf', $om->getInvoicePDFData()); $this->shop->getPreferencesManager()->setMaintenanceMode(false); $this->browser->clearCookies(); $scenario = $this->getJSONExample('invoice/simple-order.json'); // Rename the carrier so that this one gets picked $scenario['carrier']['name'] .= ' Two'; $output = InvoiceTest::runScenario($this->shop, $scenario); $this->shop->getTaxManager()->getOrCreateTaxRulesGroupFromString("3.5 + 4.1 + 7"); }
public function basicSellingFeatures() { $this->browser->clearCookies(); $scenario = $this->getJSONExample('invoice/simple-order.json'); $output = InvoiceTest::runScenario($this->shop, $scenario); InvoiceTest::checkInvoiceJson($scenario['expect']['invoice'], $output['json']); $reference = $output['json']['order']['reference']; try { $this->getEmailReader()->ensureAnEmailIsSentTo($this->getRegistrationAddress(), 300, ['body' => ['contains' => $reference]]); } catch (\Exception $e) { throw new FailedTestException("No valid order confirmation email received by customer in the 5 minutes after placing an order."); } }