9 use Magento\Cms\Test\Page\CmsIndex;
10 use Magento\Catalog\Test\Page\Category\CatalogCategoryView;
11 use Magento\Mtf\Constraint\AbstractConstraint;
12 use Magento\Mtf\Fixture\InjectableFixture;
14 use Magento\Catalog\Test\Page\Product\CatalogProductView;
30 public function processAssert(
32 CatalogCategoryView $catalogCategoryView,
33 CatalogProductView $catalogProductView,
38 $cmsIndex->getTopmenu()->selectCategoryByName(
$product->getCategoryIds()[0]);
39 $catalogCategoryView->getListProductBlock()->getProductItem(
$product)->open();
41 $viewBlock = $catalogProductView->getMsrpViewBlock();
42 $viewBlock->openMapBlock();
43 $mapBlock = $viewBlock->getMapBlock();
44 \PHPUnit\Framework\Assert::assertContains(
46 $mapBlock->getOldPrice(),
47 'Displayed on Product view page MAP is incorrect.' 49 $priceData =
$product->getDataFieldConfig(
'price')[
'source']->getPriceData();
50 $price = isset($priceData[
'category_price']) ? $priceData[
'category_price'] :
$product->getPrice();
51 \PHPUnit\Framework\Assert::assertEquals(
53 $mapBlock->getActualPrice(),
54 'Displayed on Product view page price is incorrect.' 65 return "Displayed Product MAP data on product view page is correct.";