示例#1
0
 /**
  * Verify category on the frontend
  *
  * @param Category $category
  */
 protected function assertCategoryOnFrontend(Category $category)
 {
     //Open created category on frontend
     $frontendHomePage = Factory::getPageFactory()->getCmsIndexIndex();
     $frontendHomePage->open();
     $navigationMenu = $frontendHomePage->getTopmenu();
     $navigationMenu->selectCategoryByName($category->getCategoryName());
     $this->assertEquals($category->getCategoryName(), $frontendHomePage->getTitleBlock()->getTitle());
 }
示例#2
0
 /**
  * Retrieve category name to which the product is assigned
  *
  * @return string
  */
 public function getCategoryName()
 {
     return $this->category->getCategoryName();
 }
示例#3
0
 /**
  * Select category
  *
  * @param FixtureInterface $fixture
  * @return void
  */
 protected function fillCategory(FixtureInterface $fixture)
 {
     // TODO should be removed after suggest widget implementation as typified element
     $categoryName = $this->category ? $this->category->getCategoryName() : ($fixture->getCategoryName() ? $fixture->getCategoryName() : '');
     if (!$categoryName) {
         return;
     }
     $category = $this->_rootElement->find(str_replace('%categoryName%', $categoryName, $this->categoryName), Locator::SELECTOR_XPATH);
     if (!$category->isVisible()) {
         $this->fillCategoryField($categoryName, 'category_ids-suggest', '//*[@id="attribute-category_ids-container"]');
     }
 }