/** * @Then the route with content :title should not be added */ public function theRouteWithContentShouldNotBeAdded($title) { if (!$this->indexPage->isOpen()) { $this->indexPage->open(); } Assert::false($this->indexPage->isSingleResourceOnPage(['content' => $title]), sprintf('Found route with content "%s" assigned, but expected not to.', $title)); }
/** * @Then /^(the administrator) should see the order with total "([^"]+)" in order list$/ */ public function theAdministratorShouldSeeTheOrderWithTotalInOrderList(AdminUserInterface $user, $total) { $this->sharedSecurityService->performActionAsAdminUser($user, function () use($total) { $this->indexPage->open(); Assert::true($this->indexPage->isSingleResourceOnPage(['total' => $total]), sprintf('The order with total "%s" has not been found.', $total)); }); }
/** * @Given product with :element :value should not be added */ public function productWithNameShouldNotBeAdded($element, $value) { $this->iWantToBrowseProducts(); Assert::false($this->indexPage->isSingleResourceOnPage([$element => $value]), sprintf('Product with %s %s was created, but it should not.', $element, $value)); }
/** * @param string $sourceCurrencyName * @param string $targetCurrencyName * * @throws \InvalidArgumentException */ private function assertExchangeRateIsNotOnTheList($sourceCurrencyName, $targetCurrencyName) { Assert::false($this->indexPage->isSingleResourceOnPage(['sourceCurrency' => $sourceCurrencyName, 'targetCurrency' => $targetCurrencyName]), sprintf('An exchange rate with source currency %s and target currency %s has been found on the list.', $sourceCurrencyName, $targetCurrencyName)); }
/** * @Then the order :order should have order payment state :orderPaymentState * @Then /^(this order) should have order payment state "([^"]+)"$/ * @Then /^(its) payment state should be "([^"]+)"$/ */ public function theOrderShouldHavePaymentState(OrderInterface $order, $orderPaymentState) { Assert::true($this->indexPage->isSingleResourceOnPage(['payment state' => $orderPaymentState]), sprintf('Cannot find order with "%s" order payment state in the list.', $orderPaymentState)); }
/** * @Then there should not be :email administrator anymore */ public function thereShouldBeNoAnymore($email) { Assert::false($this->indexPage->isSingleResourceOnPage(['email' => $email]), sprintf('Administrator with %s email should be deleted', $email)); }
/** * @Then /^I should(?:| still) see the (zone named "([^"]+)") in the list$/ */ public function iShouldSeeTheZoneNamedInTheList(ZoneInterface $zone) { Assert::true($this->indexPage->isSingleResourceOnPage(['code' => $zone->getCode(), 'name' => $zone->getName()]), sprintf('Zone named %s should exist in the registry', $zone->getName())); }
/** * @Then /^(this product option) should still be named "([^"]+)"$/ * @Then /^(this product option) name should be "([^"]+)"$/ */ public function thisProductOptionNameShouldStillBe(ProductOptionInterface $productOption, $productOptionName) { $this->iBrowseProductOptions(); Assert::true($this->indexPage->isSingleResourceOnPage(['code' => $productOption->getCode(), 'name' => $productOptionName]), sprintf('Product option name %s has not been assigned properly.', $productOptionName)); }
/** * @Then /^(this product attribute) should no longer exist in the registry$/ */ public function thisProductAttributeShouldNoLongerExistInTheRegistry(AttributeInterface $productAttribute) { Assert::false($this->indexPage->isSingleResourceOnPage(['code' => $productAttribute->getCode()]), sprintf('Product attribute %s should no exist in the registry, but it does.', $productAttribute->getName())); }
/** * @Then /^(this order) should not exist in the registry$/ */ public function orderShouldNotExistInTheRegistry(OrderInterface $order) { $this->indexPage->open(); Assert::false($this->indexPage->isSingleResourceOnPage(['number' => $order->getNumber()]), sprintf('Order with number %s exists but should not.', $order->getNumber())); }
/** * @Then /^(this customer group) should no longer exist in the registry$/ */ public function thisCustomerGroupShouldNoLongerExistInTheRegistry(CustomerGroupInterface $customerGroup) { Assert::false($this->indexPage->isSingleResourceOnPage(['name' => $customerGroup->getName()]), sprintf('Customer group %s should no longer exist in the registry', $customerGroup->getName())); }
/** * @Then there should still be only one shipping category with code :code */ public function thereShouldStillBeOnlyOneShippingCategoryWith($code) { $this->iWantToBrowseShippingCategories(); Assert::true($this->indexPage->isSingleResourceOnPage(['code' => $code]), sprintf('Shipping method with code %s cannot be found.', $code)); }
/** * @Then /^(this variant) should not exist in the product catalog$/ */ public function productVariantShouldNotExist(ProductVariantInterface $productVariant) { $this->iWantToViewAllVariantsOfThisProduct($productVariant->getProduct()); Assert::false($this->indexPage->isSingleResourceOnPage(['name' => $productVariant->getName()]), sprintf('Product variant with code %s exists but should not.', $productVariant->getName())); }
/** * @param ShippingMethodInterface $shippingMethod * @param bool $state */ private function assertShippingMethodState(ShippingMethodInterface $shippingMethod, $state) { $this->iWantToBrowseShippingMethods(); Assert::true($this->indexPage->isSingleResourceOnPage(['name' => $shippingMethod->getName(), 'enabled' => $state]), sprintf('Shipping method with name %s and state %s has not been found.', $shippingMethod->getName(), $state)); }
/** * @Then there should still be only one customer with email :email */ public function thereShouldStillBeOnlyOneCustomerWithEmail($email) { $this->indexPage->open(); Assert::true($this->indexPage->isSingleResourceOnPage(['email' => $email]), sprintf('Customer with email %s cannot be found.', $email)); }
/** * @param TaxRateInterface $taxRate * @param string $element * @param string $taxRateElement */ private function assertFieldValue(TaxRateInterface $taxRate, $element, $taxRateElement) { $this->indexPage->open(); Assert::true($this->indexPage->isSingleResourceOnPage(['code' => $taxRate->getCode(), $element => $taxRateElement]), sprintf('Tax rate %s %s has not been assigned properly.', $element, $taxRateElement)); }
/** * @Then it should have a :state state */ public function itShouldHaveState($state) { $this->indexPage->isSingleResourceOnPage(['state' => $state]); }
/** * @Then /^(this coupon) should still exist in the registry$/ */ public function couponShouldStillExistInTheRegistry(PromotionCouponInterface $coupon) { Assert::true($this->indexPage->isSingleResourceOnPage(['code' => $coupon->getCode()]), sprintf('Coupon with code %s should exist.', $coupon->getCode())); }
/** * @Then I should not see the order with number :orderNumber in the list */ public function iShouldNotSeeASingleOrderFromCustomer($orderNumber) { Assert::false($this->indexPage->isSingleResourceOnPage(['number' => $orderNumber]), sprintf('Cannot find order with number "%s" in the list.', $orderNumber)); }
/** * @Then tax category with :element :name should not be added */ public function taxCategoryWithElementValueShouldNotBeAdded($element, $name) { $this->indexPage->open(); Assert::false($this->indexPage->isSingleResourceOnPage([$element => $name]), sprintf('Tax category with %s %s was created, but it should not.', $element, $name)); }
/** * @Then the static content :title should no longer exist in the store */ public function theStaticContentShouldNoLongerExistInTheStore($title) { Assert::false($this->indexPage->isSingleResourceOnPage(['title' => $title]), sprintf('Static content with title %s exists, but should not.', $title)); }
/** * @Then /^(this customer group) should still be named "([^"]+)"$/ */ public function thisChannelNameShouldBe(CustomerGroupInterface $customerGroup, $customerGroupName) { $this->iWantToBrowseCustomerGroupsOfTheStore(); Assert::true($this->indexPage->isSingleResourceOnPage(['name' => $customerGroup->getName()]), sprintf('Customer group name %s has not been assigned properly.', $customerGroupName)); }
/** * @Then there should still be only one payment method with :element :code */ public function thereShouldStillBeOnlyOnePaymentMethodWith($element, $code) { $this->iBrowsePaymentMethods(); Assert::true($this->indexPage->isSingleResourceOnPage([$element => $code]), sprintf('Payment method with %s %s cannot be found.', $element, $code)); }
/** * @Then I should see the order :orderNumber with total :total */ public function iShouldSeeTheOrderWithTotal($orderNumber, $total) { Assert::true($this->indexPage->isSingleResourceOnPage(['Total' => $total]), sprintf('The total of order "%s" is not "%s".', $orderNumber, $total)); }
/** * @Then the product association type with :element :value should not be added */ public function theProductAssociationTypeWithElementValueShouldNotBeAdded($element, $value) { $this->iWantToBrowseProductAssociationTypes(); Assert::false($this->indexPage->isSingleResourceOnPage([$element => $value]), sprintf('Product association type with %s %s was created, but it should not.', $element, $value)); }