Skip to content

Commit 4dc9834

Browse files
committed
MAGETWO-97212: Enable skipped test - Move Anchored Category with Products (cron is ON, "Update on Save")
1 parent 4c43447 commit 4dc9834

File tree

1 file changed

+6
-5
lines changed
  • dev/tests/functional/tests/app/Magento/LayeredNavigation/Test/Block

1 file changed

+6
-5
lines changed

dev/tests/functional/tests/app/Magento/LayeredNavigation/Test/Block/Navigation.php

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -131,16 +131,17 @@ public function applyFilter($filter, $linkPattern)
131131
*/
132132
public function isCategoryVisible(Category $category, $qty)
133133
{
134-
$link = $this->_rootElement->find(sprintf($this->optionTitle, 'Category'), Locator::SELECTOR_XPATH);
135-
if ($link->isVisible()) {
136-
$link->click();
134+
$link = sprintf($this->categoryName, $category->getName());
135+
136+
if (!$this->_rootElement->find($link, Locator::SELECTOR_XPATH)->isVisible()) {
137+
$this->openFilterContainer('Category', $link);
137138
return $this->_rootElement->find(
138-
sprintf($this->categoryName, $category->getName()) . sprintf($this->productQtyInCategory, $qty),
139+
$link . sprintf($this->productQtyInCategory, $qty),
139140
Locator::SELECTOR_XPATH
140141
)->isVisible();
141142
} else {
142143
return $this->_rootElement->find(
143-
sprintf($this->categoryName, $category->getName()) . sprintf($this->productQty, $qty),
144+
$link . sprintf($this->productQty, $qty),
144145
Locator::SELECTOR_XPATH
145146
)->isVisible();
146147
}

0 commit comments

Comments
 (0)