Author: Arkadiusz Krakowiak (arkadiusz.krakowiak@lakion.com)
Inheritance: extends Sylius\Behat\Page\SymfonyPageInterface
Esempio n. 1
0
 /**
  * @Then I should not be able to shop without default locale
  */
 public function iShouldNotBeAbleToShop()
 {
     try {
         $this->homePage->tryToOpen();
         throw new \Exception('The page should not be able to open.');
     } catch (LocaleNotFoundException $e) {
     }
 }
Esempio n. 2
0
 /**
  * @Then I should be redirected to the homepage
  */
 public function iShouldBeRedirectedToTheHomepage()
 {
     Assert::true($this->homePage->isOpen(), 'Shop homepage should be opened, but it is not.');
 }
Esempio n. 3
0
 /**
  * @Then I should not be able to shop without default currency
  */
 public function iShouldNotBeAbleToShop()
 {
     $this->homePage->tryToOpen();
     Assert::false($this->homePage->isOpen(), 'Homepage should not be opened!');
 }
Esempio n. 4
0
 /**
  * @Then I should not be logged in
  */
 public function iShouldNotBeLoggedIn()
 {
     Assert::false($this->homePage->hasLogoutButton(), 'I should not be logged in.');
 }
Esempio n. 5
0
 /**
  * @Then I should not see a homepage from :theme theme
  */
 public function iShouldNotSeeThemedHomepage(ThemeInterface $theme)
 {
     $content = file_get_contents(rtrim($theme->getPath(), '/') . '/SyliusShopBundle/views/Homepage/index.html.twig');
     Assert::notSame($this->homePage->getContents(), $content);
 }
Esempio n. 6
0
 /**
  * @When /^I visit (this channel)'s homepage$/
  */
 public function iVisitChannelHomepage(ChannelInterface $channel)
 {
     $this->channelContextSetter->setChannel($channel);
     $this->homePage->open();
 }
Esempio n. 7
0
 /**
  * @When I log out
  */
 public function iLogOut()
 {
     $this->homePage->logOut();
 }
Esempio n. 8
0
 /**
  * @Then I should not see a homepage from :theme theme
  */
 public function iShouldNotSeeThemedHomepage(ThemeInterface $theme)
 {
     $content = file_get_contents(rtrim($theme->getPath(), '/') . '/SyliusWebBundle/views/Frontend/Homepage/main.html.twig');
     expect($this->homePage->getContents())->notToBe($content);
 }
 /**
  * @Then I should not be logged in as :fullName
  */
 public function iShouldNotBeLoggedInAs($fullName)
 {
     $this->homePage->open();
     Assert::false($this->homePage->hasLogoutButton(), 'I should not be logged in.');
     Assert::false(strpos($this->homePage->getFullName(), $fullName), sprintf('I should not be logged in as %s.', $fullName));
 }
Esempio n. 10
0
 /**
  * @Then I should see :numberOfProducts products in the list
  */
 public function iShouldSeeProductsInTheList($numberOfProducts)
 {
     $foundProductsNames = $this->homePage->getLatestProductsNames();
     Assert::same((int) $numberOfProducts, count($foundProductsNames), '%d rows with products should appear on page, %d rows has been found');
 }