Skip to content

Commit 14bfca1

Browse files
committed
Merge remote-tracking branch 'origin/AC-7585' into AC-6762-v1
2 parents 8afca5a + 660ce38 commit 14bfca1

File tree

1 file changed

+14
-3
lines changed

1 file changed

+14
-3
lines changed

dev/tests/api-functional/testsuite/Magento/GraphQl/Catalog/ProductPriceTest.php

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,11 @@
3737
*/
3838
class ProductPriceTest extends GraphQlAbstract
3939
{
40+
/**
41+
* @var float
42+
*/
43+
private const EPSILON = 0.0000000001;
44+
4045
/** @var ObjectManager $objectManager */
4146
private $objectManager;
4247

@@ -692,7 +697,7 @@ public function testConfigurableProductWithVariantsHavingSpecialAndTierPrices()
692697
'customer_group_id' => Group::CUST_GROUP_ALL,
693698
'percentage_value'=> null,
694699
'qty'=> 2,
695-
'value'=> 20
700+
'value'=> 20,
696701
]
697702
];
698703
foreach ($configurableProductVariants as $configurableProductVariant) {
@@ -1218,8 +1223,14 @@ private function assertPrices($expectedPrices, $actualPrices, $currency = 'USD')
12181223
$expected['final_price']['currency'] ?? $currency,
12191224
$actual['final_price']['currency']
12201225
);
1221-
$this->assertEquals($expected['discount']['amount_off'], $actual['discount']['amount_off']);
1222-
$this->assertEquals($expected['discount']['percent_off'], $actual['discount']['percent_off']);
1226+
$this->assertEqualsWithDelta(
1227+
$expected['discount']['amount_off'],
1228+
$actual['discount']['amount_off'],
1229+
self::EPSILON);
1230+
$this->assertEqualsWithDelta(
1231+
$expected['discount']['percent_off'],
1232+
$actual['discount']['percent_off'],
1233+
self::EPSILON);
12231234
}
12241235
}
12251236

0 commit comments

Comments
 (0)