/**
  * {@inheritdoc}
  */
 public function getType()
 {
     if ($this->getMessageElement()->hasClass('positive')) {
         return NotificationType::success();
     }
     if ($this->getMessageElement()->hasClass('negative')) {
         return NotificationType::failure();
     }
     throw new \RuntimeException('Cannot resolve notification type');
 }
 /**
  * @Then I should be notified that it has been successfully updated
  */
 public function iShouldBeNotifiedAboutItHasBeenSuccessfullyCanceled()
 {
     $this->notificationChecker->checkNotification('Order has been successfully updated.', NotificationType::success());
 }
 /**
  * @Then I should be notified that my review is waiting for the acceptation
  */
 public function iShouldBeNotifiedThatMyReviewIsWaitingForTheAcceptation()
 {
     $this->notificationChecker->checkNotification('Your review is waiting for the acceptation.', NotificationType::success());
 }
Beispiel #4
0
 /**
  * @Then I should be notified that my password has been successfully changed
  */
 public function iShouldBeNotifiedThatMyPasswordHasBeenSuccessfullyChanged()
 {
     $this->notificationChecker->checkNotification('has been changed successfully!', NotificationType::success());
 }
Beispiel #5
0
 /**
  * @Then I should be notified that the address has been set as default
  */
 public function iShouldBeNotifiedThatAddressHasBeenSetAsDefault()
 {
     $this->notificationChecker->checkNotification('Address has been set as default', NotificationType::success());
 }
 /**
  * @Then I should be notified that it has been successfully deleted
  */
 public function iShouldBeNotifiedThatItHasBeenSuccessfullyDeleted()
 {
     $this->notificationChecker->checkNotification('has been successfully deleted.', NotificationType::success());
 }
 /**
  * @Then /^I should be notified that it has been successfully (accepted|rejected)$/
  */
 public function iShouldBeNotifiedThatItHasBeenSuccessfullyUpdated($action)
 {
     $this->notificationChecker->checkNotification(sprintf('Product review has been successfully %s.', $action), NotificationType::success());
 }
 /**
  * @Then I should be notified that it has been successfully generated
  */
 public function iShouldBeNotifiedThatItHasBeenSuccessfullyGenerated()
 {
     $this->notificationChecker->checkNotification('Success Promotion coupons have been successfully generated.', NotificationType::success());
 }
Beispiel #9
0
 /**
  * @Then I should be notified that the product has been successfully added
  */
 public function iShouldBeNotifiedThatItHasBeenSuccessfullyAdded()
 {
     $this->notificationChecker->checkNotification('Item has been added to cart', NotificationType::success());
 }
Beispiel #10
0
 /**
  * @Then I should be notified that email with reset instruction has been send
  */
 public function iShouldBeNotifiedThatEmailWithResetInstructionWasSend()
 {
     $this->notificationChecker->checkNotification('If the email you have specified exists in our system, we have sent there an instruction on how to reset your password.', NotificationType::success());
 }
 function it_throws_notification_mismatch_exception_if_success_message_type_has_been_found_but_expect_failure(NotificationAccessorInterface $notificationAccessor)
 {
     $notificationAccessor->getType()->willReturn(NotificationType::success());
     $notificationAccessor->getMessage()->willReturn('Something went wrong.');
     $this->shouldThrow(new NotificationExpectationMismatchException(NotificationType::failure(), 'Something went wrong.', NotificationType::success(), 'Something went wrong.'))->during('checkNotification', ['Something went wrong.', NotificationType::failure()]);
 }
Beispiel #12
0
 /**
  * @Then I should be notified that the verification email has been sent
  */
 public function iShouldBeNotifiedThatTheVerificationEmailHasBeenSent()
 {
     $this->notificationChecker->checkNotification('An email with the verification link has been sent to your email address.', NotificationType::success());
 }
Beispiel #13
0
 /**
  * @Then I should be notified that promotion coupon has been added to the cart
  */
 public function iShouldBeNotifiedThatPromotionCouponHasBeenAddedToTheCart()
 {
     $this->notificationChecker->checkNotification('Your promotion coupon has been added to the cart.', NotificationType::success());
 }
Beispiel #14
0
 /**
  * @Then I should be notified that new account has been successfully created
  */
 public function iShouldBeNotifiedThatNewAccountHasBeenSuccessfullyCreated()
 {
     $this->notificationChecker->checkNotification('Customer has been successfully created.', NotificationType::success());
 }