Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
AssertProductEditPageAdvancedPricingFields.php
Go to the documentation of this file.
1 <?php
8 
9 use Magento\Catalog\Test\Page\Adminhtml\CatalogProductEdit;
10 use Magento\Mtf\Constraint\AbstractConstraint;
11 use Magento\Mtf\Fixture\FixtureInterface;
12 
16 class AssertProductEditPageAdvancedPricingFields extends AbstractConstraint
17 {
23  private $manufacturerFieldTitle = 'Manufacturer\'s Suggested Retail Price';
24 
30  public function processAssert(CatalogProductEdit $catalogProductEdit, FixtureInterface $product)
31  {
32  $catalogProductEdit->open(['id' => $product->getId()]);
33  $catalogProductEdit->getProductForm()->openSection('advanced-pricing');
34  $advancedPricing = $catalogProductEdit->getProductForm()->getSection('advanced-pricing');
35 
36  \PHPUnit\Framework\Assert::assertTrue(
37  $advancedPricing->checkField($this->manufacturerFieldTitle),
38  '"Manufacturer\'s Suggested Retail Price" field is not correct.'
39  );
40  }
41 
47  public function toString()
48  {
49  return '"Manufacturer\'s Suggested Retail Price" field is correct.';
50  }
51 }
processAssert(CatalogProductEdit $catalogProductEdit, FixtureInterface $product)