File tree Expand file tree Collapse file tree 2 files changed +19
-2
lines changed
dev/tests/functional/tests/app/Magento
Catalog/Test/Block/Product
ConfigurableProduct/Test/Block/Product Expand file tree Collapse file tree 2 files changed +19
-2
lines changed Original file line number Diff line number Diff line change @@ -211,10 +211,23 @@ class View extends AbstractConfigureBlock
211
211
/**
212
212
* Get block price.
213
213
*
214
+ * @param FixtureInterface|null $product
215
+ *
214
216
* @return Price
215
217
*/
216
- public function getPriceBlock ()
218
+ public function getPriceBlock (FixtureInterface $ product = null )
217
219
{
220
+ $ typeId = null ;
221
+
222
+ if ($ product ) {
223
+ $ dataConfig = $ product ->getDataConfig ();
224
+ $ typeId = isset ($ dataConfig ['type_id ' ]) ? $ dataConfig ['type_id ' ] : null ;
225
+ }
226
+
227
+ if ($ this ->hasRender ($ typeId )) {
228
+ return $ this ->callRender ($ typeId , 'getPriceBlock ' );
229
+ }
230
+
218
231
return $ this ->blockFactory ->create (
219
232
'Magento\Catalog\Test\Block\Product\Price ' ,
220
233
['element ' => $ this ->_rootElement ->find ($ this ->priceBlock , Locator::SELECTOR_XPATH )]
Original file line number Diff line number Diff line change @@ -18,9 +18,13 @@ class View extends \Magento\Catalog\Test\Block\Product\View
18
18
/**
19
19
* Gets a configurable product price block.
20
20
*
21
+ * @param FixtureInterface|null $product
22
+ *
21
23
* @return Price
24
+ *
25
+ * @SuppressWarnings(PHPMD.UnusedFormalParameter)
22
26
*/
23
- public function getPriceBlock ()
27
+ public function getPriceBlock (FixtureInterface $ product = null )
24
28
{
25
29
return $ this ->blockFactory ->create (
26
30
'Magento\ConfigurableProduct\Test\Block\Product\Price ' ,
You can’t perform that action at this time.
0 commit comments