Skip to content

Commit c685025

Browse files
author
Maksym Aposov
committed
MAGETWO-43861: Magento\CatalogRule\Test\TestCase\CreateCatalogRuleTest fails
1 parent 24abff1 commit c685025

File tree

3 files changed

+12
-0
lines changed

3 files changed

+12
-0
lines changed

dev/tests/functional/tests/app/Magento/Catalog/Test/Repository/CatalogProductSimple.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@
7373
<item name="qty" xsi:type="string">25</item>
7474
<item name="is_in_stock" xsi:type="string">In Stock</item>
7575
</field>
76+
<field name="product_has_weight" xsi:type="string">Yes</field>
7677
<field name="weight" xsi:type="string">1</field>
7778
<field name="price" xsi:type="array">
7879
<item name="value" xsi:type="string">560</item>

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ public function processAssert(
5858
. "\nActual: " . $actualPrice . "\n"
5959
);
6060
}
61+
$checkoutCartPage->getTotalsBlock()->waitForShippingPriceBlock();
6162
$actualPrices['sub_total'] = $checkoutCartPage->getTotalsBlock()->getSubtotal();
6263
$actualPrices['grand_total'] = $checkoutCartPage->getTotalsBlock()->getGrandTotal();
6364
$expectedPrices['sub_total'] = $cartPrice['sub_total'];

dev/tests/functional/tests/app/Magento/Checkout/Test/Block/Cart/Totals.php

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -252,4 +252,14 @@ public function waitForUpdatedTotals()
252252
sleep(1);
253253
$this->waitForElementNotVisible($this->blockWaitElement);
254254
}
255+
256+
/**
257+
* Wait for shipping block to appear
258+
*
259+
* @return bool|null
260+
*/
261+
public function waitForShippingPriceBlock()
262+
{
263+
$this->waitForElementVisible($this->shippingPriceBlockSelector, Locator::SELECTOR_CSS);
264+
}
255265
}

0 commit comments

Comments
 (0)