Skip to content

Commit e0abe0a

Browse files
author
Dmytro Aponasenko
committed
MTA-1602: Sync qmt repository with mainline - Sprint 6
1 parent 4a8238e commit e0abe0a

File tree

4 files changed

+10
-32
lines changed

4 files changed

+10
-32
lines changed

dev/tests/functional/tests/app/Magento/Bundle/Test/Constraint/AssertBundleInCategory.php

Lines changed: 7 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -6,53 +6,31 @@
66

77
namespace Magento\Bundle\Test\Constraint;
88

9-
use Magento\Bundle\Test\Fixture\BundleProduct;
109
use Magento\Catalog\Test\Fixture\Category;
10+
use Magento\Bundle\Test\Fixture\BundleProduct;
1111
use Magento\Catalog\Test\Page\Category\CatalogCategoryView;
12-
use Magento\Cms\Test\Page\CmsIndex;
13-
use Magento\Mtf\Constraint\AbstractConstraint;
12+
use Magento\Catalog\Test\Constraint\AssertProductInCategory;
13+
use Magento\Mtf\Fixture\FixtureInterface;
1414

1515
/**
1616
* Check bundle product on the category page.
1717
*/
18-
class AssertBundleInCategory extends AbstractConstraint
18+
class AssertBundleInCategory extends AssertProductInCategory
1919
{
2020
/* tags */
2121
const SEVERITY = 'low';
2222
/* end tags */
2323

24-
/**
25-
* Check bundle product on the category page.
26-
*
27-
* @param CatalogCategoryView $catalogCategoryView
28-
* @param CmsIndex $cmsIndex
29-
* @param BundleProduct $product
30-
* @param Category $category
31-
* @return void
32-
*/
33-
public function processAssert(
34-
CatalogCategoryView $catalogCategoryView,
35-
CmsIndex $cmsIndex,
36-
BundleProduct $product,
37-
Category $category
38-
) {
39-
//Open category view page
40-
$cmsIndex->open();
41-
$cmsIndex->getTopmenu()->selectCategoryByName($category->getName());
42-
43-
//Process asserts
44-
$this->assertPrice($product, $catalogCategoryView);
45-
}
46-
4724
/**
4825
* Verify product price on category view page.
4926
*
50-
* @param BundleProduct $bundle
27+
* @param FixtureInterface $bundle
5128
* @param CatalogCategoryView $catalogCategoryView
5229
* @return void
5330
*/
54-
protected function assertPrice(BundleProduct $bundle, CatalogCategoryView $catalogCategoryView)
31+
protected function assertPrice(FixtureInterface $bundle, CatalogCategoryView $catalogCategoryView)
5532
{
33+
/** @var BundleProduct $bundle */
5634
$priceData = $bundle->getDataFieldConfig('price')['source']->getPreset();
5735
//Price from/to verification
5836
$priceBlock = $catalogCategoryView->getListProductBlock()->getProductPriceBlock($bundle->getName());

dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Adminhtml/Product/Edit/Tab/ProductDetails/NewCategoryIds.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ public function addNewCategory(Category $category)
6969
*/
7070
protected function openNewCategoryDialog()
7171
{
72-
$this->_rootElement->find($this->buttonNewCategory)->click();
72+
$this->browser->find($this->buttonNewCategory)->click();
7373
$this->waitForElementVisible($this->createCategoryDialog);
7474
}
7575
}

dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/CatalogProductSimple/CategoryIds.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ public function __construct(
6262
continue;
6363
}
6464
$category = $fixtureFactory->createByCode('category', ['dataSet' => $preset]);
65-
if (!isset($data['new_category']) || $data['new_category'] !== 'no') {
65+
if (!isset($data['new_category']) || $data['new_category'] !== 'yes') {
6666
$category->persist();
6767
}
6868

dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/Product/CreateSimpleProductEntityTest.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -671,7 +671,7 @@
671671
<variation name="CreateSimpleProductEntityTestVariation23">
672672
<data name="description">MAGETWO-13345: Create Simple Product with Creating New Category (Required Fields Only)</data>
673673
<data name="configData">-</data>
674-
<data name="product/data/category_ids/new_category">no</data>
674+
<data name="product/data/category_ids/new_category">yes</data>
675675
<data name="product/data/category_ids/presets">default_subcategory</data>
676676
<data name="product/data/url_key">simple%isolation%</data>
677677
<data name="product/data/name">simple%isolation%</data>

0 commit comments

Comments
 (0)