Skip to content

Commit eb29997

Browse files
committed
Fix functional test.
1 parent e99d90a commit eb29997

File tree

2 files changed

+11
-7
lines changed

2 files changed

+11
-7
lines changed

dev/tests/functional/tests/app/Magento/Wishlist/Test/Constraint/AssertProductRegularPriceOnStorefront.php

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -75,13 +75,17 @@ public function processAssert(
7575
}
7676

7777
$productItem = $wishlistIndex->getWishlistBlock()->getProductItemsBlock()->getItemProduct($product);
78-
$wishListProductRegularPrice = (float)$productItem->getRegularPrice();
78+
$wishListProductRegularPrice = $product instanceof BundleProduct
79+
? (float)$productItem->getPrice()
80+
: (float)$productItem->getRegularPrice();
7981

80-
\PHPUnit\Framework\Assert::assertEquals(
81-
$this->regularPriceLabel,
82-
$productItem->getPriceLabel(),
83-
'Wrong product regular price is displayed.'
84-
);
82+
if (!$product instanceof BundleProduct) {
83+
\PHPUnit\Framework\Assert::assertEquals(
84+
$this->regularPriceLabel,
85+
$productItem->getPriceLabel(),
86+
'Wrong product regular price is displayed.'
87+
);
88+
}
8589

8690
\PHPUnit\Framework\Assert::assertNotEmpty(
8791
$wishListProductRegularPrice,

dev/tests/functional/tests/app/Magento/Wishlist/Test/TestCase/AddProductToWishlistEntityTest.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@
108108
</variation>
109109
<variation name="AddProductToWishlistEntityTestVariation14" ticketId="MAGETWO-90131">
110110
<data name="product" xsi:type="array">
111-
<item name="0" xsi:type="string">bundleProduct::with_special_price_and_custom_options</item>
111+
<item name="0" xsi:type="string">bundleProduct::default_with_one_simple_product</item>
112112
</data>
113113
<constraint name="Magento\Wishlist\Test\Constraint\AssertAddProductToWishlistSuccessMessage"/>
114114
<constraint name="Magento\Wishlist\Test\Constraint\AssertProductIsPresentInWishlist"/>

0 commit comments

Comments
 (0)