/**
  * Verify if we're on an expected page. Throw an exception if not.
  */
 public function verifyPage()
 {
     if ($this->getDriver() instanceof Selenium2Driver) {
         $this->getSession()->wait(5000, '$("#sAGB").length > 0');
     }
     $namedSelectors = $this->getNamedSelectors();
     $language = Helper::getCurrentLanguage();
     try {
         $assert = new WebAssert($this->getSession());
         $assert->pageTextContains($namedSelectors['gtc'][$language]);
     } catch (ResponseTextException $e) {
         $message = ['You are not on the checkout confirmation page!', 'Current URL: ' . $this->getSession()->getCurrentUrl()];
         Helper::throwException($message);
     }
 }
 /**
  * @param string $keyword
  */
 public function receiveNoResultsMessageForKeyword($keyword)
 {
     $assert = new WebAssert($this->getSession());
     $assert->pageTextContains(sprintf('Leider wurden zu "%s" keine Artikel gefunden', $keyword));
 }
 /**
  * Check if the user was successfully logged in
  * @param string $username
  * @throws \Behat\Mink\Exception\ResponseTextException
  */
 public function verifyLogin($username)
 {
     $assert = new WebAssert($this->getSession());
     $assert->pageTextContains('Dies ist Ihr Konto Dashboard, wo Sie die Möglichkeit haben, Ihre letzten Kontoaktivitäten einzusehen');
     $assert->pageTextContains('Willkommen, ' . $username);
 }
Beispiel #4
0
 /**
  * @param string $keyword
  */
 public function receiveNoResultsMessageForKeyword($keyword)
 {
     // $keyword gets ignored in responsive template
     $assert = new WebAssert($this->getSession());
     $assert->pageTextContains('Leider wurden zu Ihrer Suchanfrage keine Artikel gefunden');
 }
Beispiel #5
0
 /**
  * Verify if we're on an expected page. Throw an exception if not.
  * @return bool
  * @throws \Exception
  */
 public function verifyPage()
 {
     try {
         $assert = new WebAssert($this->getSession());
         $assert->pageTextContains('1 Ihr Warenkorb 2 Ihre Adresse 3 Prüfen und Bestellen');
     } catch (ResponseTextException $e) {
         $message = ['You are not on the cart!', 'Current URL: ' . $this->getSession()->getCurrentUrl()];
         Helper::throwException($message);
     }
     return Helper::hasNamedLink($this, 'checkout');
 }
Beispiel #6
0
 /**
  * @Then I should see the text :text
  * @Then I should see :text
  *
  * Visible text, not in a comment
  */
 public function iShouldSeeTheText($text)
 {
     $this->assert->pageTextContains($text);
 }