Skip to content

Commit 97b753c

Browse files
committed
MAGETWO-72312: Incorrect count for category filter at layered navigation for configurable with no available options
1 parent fd25a3d commit 97b753c

File tree

1 file changed

+6
-10
lines changed

1 file changed

+6
-10
lines changed

dev/tests/functional/tests/app/Magento/LayeredNavigation/Test/TestCase/ProductsCountInLayeredNavigationTest.php

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -92,16 +92,12 @@ public function test(
9292
// Disable configurable options
9393
if ($disableFromProductsGreed) {
9494
$this->catalogProductIndex->open();
95-
$this->catalogProductIndex->getProductGrid()->sortByColumn('ID');
96-
$this->catalogProductIndex->getProductGrid()->massaction(
97-
array_map(
98-
function ($assignedProduct) {
99-
return ['sku' => $assignedProduct['sku']];
100-
},
101-
$configurableOptions
102-
),
103-
['Change status' => 'Disable']
104-
);
95+
foreach ($configurableOptions as $configurableOption) {
96+
$filter = ['sku' => $configurableOption['sku']];
97+
$this->catalogProductIndex->getProductGrid()->search($filter);
98+
$this->catalogProductIndex->getProductGrid()->selectItems([$filter]);
99+
$this->catalogProductIndex->getProductGrid()->selectAction(['Change status' => 'Disable']);
100+
}
105101
} else {
106102
$productToDisable = $this->fixtureFactory->createByCode(
107103
'catalogProductSimple',

0 commit comments

Comments
 (0)