Skip to content

Commit 5e6f1cb

Browse files
author
Dmytro Vilchynskyi
committed
MAGETWO-77840: [2.2.x] - Special/lowest price in child of a Configurable Product causes the entire product to show that price
- fixing FAT
1 parent 675f3f3 commit 5e6f1cb

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

dev/tests/functional/tests/app/Magento/CatalogRule/Test/Constraint/AssertCatalogPriceRuleAppliedProductPage.php

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@
1111
use Magento\Mtf\Constraint\AbstractConstraint;
1212
use Magento\Catalog\Test\Page\Product\CatalogProductView;
1313
use Magento\Catalog\Test\Page\Category\CatalogCategoryView;
14+
use Magento\Customer\Test\TestStep\LoginCustomerOnFrontendStep;
15+
use Magento\Customer\Test\TestStep\LogoutCustomerOnFrontendStep;
1416

1517
/**
1618
* Assert that Catalog Price Rule is applied on Product page.
@@ -38,11 +40,11 @@ public function processAssert(
3840
) {
3941
if ($customer !== null) {
4042
$this->objectManager->create(
41-
\Magento\Customer\Test\TestStep\LoginCustomerOnFrontendStep::class,
43+
LoginCustomerOnFrontendStep::class,
4244
['customer' => $customer]
4345
)->run();
4446
} else {
45-
$this->objectManager->create(\Magento\Customer\Test\TestStep\LogoutCustomerOnFrontendStep::class)->run();
47+
$this->objectManager->create(LogoutCustomerOnFrontendStep::class)->run();
4648
}
4749

4850
$cmsIndexPage->open();
@@ -52,7 +54,7 @@ public function processAssert(
5254
$catalogCategoryViewPage->getListProductBlock()->getProductItem($product)->open();
5355

5456
$catalogProductViewPage->getViewBlock()->waitLoader();
55-
$productPriceBlock = $catalogProductViewPage->getViewBlock()->getPriceBlock();
57+
$productPriceBlock = $catalogProductViewPage->getViewBlock()->getPriceBlock($product);
5658
$actualPrice['special'] = $productPriceBlock->getSpecialPrice();
5759
if ($productPrice[$key]['regular'] !== 'No') {
5860
$actualPrice['regular'] = $productPriceBlock->getOldPrice();

0 commit comments

Comments
 (0)