Skip to content

Commit d9f4f47

Browse files
vital-pantsialeyeunikshostko
authored andcommitted
MAGETWO-63054: [Catalog] MSRP field is not displayed for bundle products with fixed price
- Added variation to functional test
1 parent a26b24f commit d9f4f47

File tree

2 files changed

+3
-22
lines changed

2 files changed

+3
-22
lines changed

dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Adminhtml/Product/Edit/Section/AdvancedPricing.php

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -124,22 +124,10 @@ public function getTierPriceForm(SimpleElement $element = null)
124124
* Check if the field is displayed correctly.
125125
*
126126
* @param string $fieldName
127-
* @param string|null $previousFieldName
128127
* @return bool
129128
*/
130-
public function checkField($fieldName, $previousFieldName = null)
129+
public function checkField($fieldName)
131130
{
132-
$field = $this->_rootElement->find(sprintf($this->fieldByName, $fieldName), Locator::SELECTOR_XPATH);
133-
if ($field->isVisible()) {
134-
if ($previousFieldName) {
135-
return $this->_rootElement->find(
136-
sprintf($this->previousField, $fieldName),
137-
Locator::SELECTOR_XPATH
138-
)->getText() == $previousFieldName;
139-
} else {
140-
return $field->isVisible();
141-
}
142-
}
143-
return false;
131+
return $this->_rootElement->find(sprintf($this->fieldByName, $fieldName), Locator::SELECTOR_XPATH)->isVisible();
144132
}
145133
}

dev/tests/functional/tests/app/Magento/Msrp/Test/Constraint/AssertProductEditPageAdvancedPricingFields.php

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,6 @@
1515
*/
1616
class AssertProductEditPageAdvancedPricingFields extends AbstractConstraint
1717
{
18-
/**
19-
* Title of "Price View".
20-
*
21-
* @var string
22-
*/
23-
private $priceFieldTitle = 'Price View';
24-
2518
/**
2619
* Title of "Manufacturer's Suggested Retail Price" field.
2720
*
@@ -41,7 +34,7 @@ public function processAssert(CatalogProductEdit $catalogProductEdit, FixtureInt
4134
$advancedPricing = $catalogProductEdit->getProductForm()->getSection('advanced-pricing');
4235

4336
\PHPUnit_Framework_Assert::assertTrue(
44-
$advancedPricing->checkField($this->manufacturerFieldTitle, $this->priceFieldTitle),
37+
$advancedPricing->checkField($this->manufacturerFieldTitle),
4538
'"Manufacturer\'s Suggested Retail Price" field is not correct.'
4639
);
4740
}

0 commit comments

Comments
 (0)