Skip to content

Commit d579085

Browse files
author
Gurzhyi, Andrii
committed
MAGETWO-48227: Fix API/Integration tests
- Fixed tests
1 parent c7d7be7 commit d579085

File tree

2 files changed

+18
-5
lines changed
  • app/code/Magento/ConfigurableProduct/view/adminhtml/templates/catalog/product/composite/fieldset
  • dev/tests/integration/testsuite/Magento/ConfigurableProduct/Model/Product/Type/Configurable

2 files changed

+18
-5
lines changed

app/code/Magento/ConfigurableProduct/view/adminhtml/templates/catalog/product/composite/fieldset/configurable.phtml

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,20 @@
1414
<?php $_skipSaleableCheck = $this->helper('Magento\Catalog\Helper\Product')->getSkipSaleableCheck(); ?>
1515
<?php if (($_product->isSaleable() || $_skipSaleableCheck) && count($_attributes)):?>
1616
<fieldset id="catalog_product_composite_configure_fields_configurable" class="fieldset admin__fieldset">
17-
<legend class="legend admin__legend"><span><?php /* @escapeNotVerified */ echo __('Associated Products') ?></span></legend>
17+
<legend class="legend admin__legend">
18+
<span><?php /* @escapeNotVerified */ echo __('Associated Products') ?></span>
19+
</legend>
1820
<div class="product-options">
1921
<div class="field admin__field _required required">
2022
<?php foreach ($_attributes as $_attribute): ?>
21-
<label class="label admin__field-label"><?php /* @escapeNotVerified */ echo $_attribute->getLabel() ?></label>
22-
<div class="control admin__field-control <?php if ($_attribute->getDecoratedIsLast()):?> last<?php endif; ?>">
23+
<label class="label admin__field-label"><?php
24+
/* @escapeNotVerified */ echo $_attribute->getProductAttribute()
25+
->getStoreLabel($_product->getStoreId());
26+
?></label>
27+
<div class="control admin__field-control <?php
28+
if ($_attribute->getDecoratedIsLast()):
29+
?> last<?php
30+
endif; ?>">
2331
<select name="super_attribute[<?php /* @escapeNotVerified */ echo $_attribute->getAttributeId() ?>]"
2432
id="attribute<?php /* @escapeNotVerified */ echo $_attribute->getAttributeId() ?>"
2533
class="admin__control-select required-entry super-attribute-select">

dev/tests/integration/testsuite/Magento/ConfigurableProduct/Model/Product/Type/Configurable/PriceTest.php

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,7 @@
99
use Magento\Catalog\Model\Product\Type\AbstractType;
1010

1111
/**
12-
* @magentoDbIsolation enabled
13-
* @magentoDataFixture Magento/ConfigurableProduct/_files/tax_rule.php
12+
* Class PriceTest
1413
*/
1514
class PriceTest extends \PHPUnit_Framework_TestCase
1615
{
@@ -30,6 +29,7 @@ protected function setUp()
3029

3130
/**
3231
* @magentoDbIsolation enabled
32+
* @magentoDataFixture Magento/ConfigurableProduct/_files/tax_rule.php
3333
* @magentoDataFixture Magento/ConfigurableProduct/_files/product_configurable.php
3434
*/
3535
public function testGetFinalPrice()
@@ -40,6 +40,7 @@ public function testGetFinalPrice()
4040
/**
4141
* @magentoConfigFixture current_store tax/display/type 1
4242
* @magentoDbIsolation enabled
43+
* @magentoDataFixture Magento/ConfigurableProduct/_files/tax_rule.php
4344
* @magentoDataFixture Magento/ConfigurableProduct/_files/product_configurable.php
4445
*/
4546
public function testGetFinalPriceExcludingTax()
@@ -50,6 +51,7 @@ public function testGetFinalPriceExcludingTax()
5051
/**
5152
* @magentoConfigFixture current_store tax/display/type 2
5253
* @magentoDbIsolation enabled
54+
* @magentoDataFixture Magento/ConfigurableProduct/_files/tax_rule.php
5355
* @magentoDataFixture Magento/ConfigurableProduct/_files/product_configurable.php
5456
*/
5557
public function testGetFinalPriceIncludingTax()
@@ -61,6 +63,7 @@ public function testGetFinalPriceIncludingTax()
6163
/**
6264
* @magentoConfigFixture current_store tax/display/type 3
6365
* @magentoDbIsolation enabled
66+
* @magentoDataFixture Magento/ConfigurableProduct/_files/tax_rule.php
6467
* @magentoDataFixture Magento/ConfigurableProduct/_files/product_configurable.php
6568
*/
6669
public function testGetFinalPriceIncludingExcludingTax()
@@ -71,6 +74,7 @@ public function testGetFinalPriceIncludingExcludingTax()
7174

7275
/**
7376
* @magentoDbIsolation enabled
77+
* @magentoDataFixture Magento/ConfigurableProduct/_files/tax_rule.php
7478
* @magentoDataFixture Magento/ConfigurableProduct/_files/product_configurable.php
7579
*/
7680
public function testGetFinalPriceWithSelectedSimpleProduct()
@@ -82,6 +86,7 @@ public function testGetFinalPriceWithSelectedSimpleProduct()
8286

8387
/**
8488
* @magentoDbIsolation enabled
89+
* @magentoDataFixture Magento/ConfigurableProduct/_files/tax_rule.php
8590
* @magentoDataFixture Magento/ConfigurableProduct/_files/product_configurable.php
8691
*/
8792
public function testGetFinalPriceWithCustomOption()

0 commit comments

Comments
 (0)