Example #1
0
 /**
  * @Then /^(the administrator) should know about (this additional note) for (this order made by "[^"]+")$/
  */
 public function theCustomerServiceShouldKnowAboutThisAdditionalNotes(AdminUserInterface $user, $note, OrderInterface $order)
 {
     $this->sharedSecurityService->performActionAsAdminUser($user, function () use($note, $order) {
         $this->showPage->open(['id' => $order->getId()]);
         Assert::true($this->showPage->hasNote($note), sprintf('I should see %s note, but I do not see', $note));
     });
 }
Example #2
0
 /**
  * @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));
     });
 }
Example #3
0
 /**
  * @Given /^(this user) bought(?: this product| those products)$/
  */
 public function thisUserBought(ShopUserInterface $user)
 {
     $this->sharedSecurityService->performActionAsShopUser($user, function () {
         $this->iProceedSelectingPaymentMethod();
         $this->iConfirmMyOrder();
     });
 }
Example #4
0
 /**
  * @Given /^(this user) has (\d+) (products "[^"]+") in the cart$/
  * @Given /^(this user) added (\d+) (products "[^"]+") to the cart$/
  */
 public function thisCustomerHasAddedProductsToTheCart(ShopUserInterface $shopUser, $quantity, ProductInterface $product)
 {
     $this->sharedSecurityService->performActionAsShopUser($shopUser, function () use($quantity, $product) {
         $this->iAddQuantityOfProductsToTheCart($quantity, $product);
     });
 }
Example #5
0
 /**
  * @Given /^(this user) has ("[^"]+" product) in the cart$/
  */
 public function thisUserHasProductInTheCart(ShopUserInterface $user, ProductInterface $product)
 {
     $this->sharedSecurityService->performActionAsShopUser($user, function () use($product) {
         $this->iAddProductToTheCart($product);
     });
 }