Skip to content

Commit 5b81c10

Browse files
committed
MTA-2483: Extend Update Category
- CR Changes
1 parent baae745 commit 5b81c10

File tree

4 files changed

+14
-11
lines changed

4 files changed

+14
-11
lines changed

dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Adminhtml/Category/Edit/PageActions.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,12 @@
66

77
namespace Magento\Catalog\Test\Block\Adminhtml\Category\Edit;
88

9+
use Magento\Backend\Test\Block\FormPageActions;
10+
911
/**
1012
* Category page actions.
1113
*/
12-
class PageActions extends \Magento\Backend\Test\Block\System\Config\PageActions
14+
class PageActions extends FormPageActions
1315
{
1416
/**
1517
* Locator for "OK" button in warning block

dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertCategoryWithCustomStoreOnFrontend.php

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -13,16 +13,12 @@
1313
use Magento\Cms\Test\Page\CmsIndex;
1414

1515
/**
16-
* Assert that category with custom store visible on frontend.
16+
* Assert that category name is different on different store view.
1717
*/
1818
class AssertCategoryWithCustomStoreOnFrontend extends AbstractConstraint
1919
{
20-
/* tags */
21-
const SEVERITY = 'low';
22-
/* end tags */
23-
2420
/**
25-
* Assert that category with custom store visible on frontend.
21+
* Assert that category name is different on different store view.
2622
*
2723
* @param BrowserInterface $browser
2824
* @param CatalogCategoryView $categoryView
@@ -44,7 +40,7 @@ public function processAssert(
4440
\PHPUnit_Framework_Assert::assertEquals(
4541
$initialCategory->getName(),
4642
$categoryView->getTitleBlock()->getTitle(),
47-
'Wrong page is displayed on default store.'
43+
'Wrong category name is displayed for default store.'
4844
);
4945

5046
$store = $category->getDataFieldConfig('store_id')['source']->store->getName();
@@ -54,7 +50,7 @@ public function processAssert(
5450
\PHPUnit_Framework_Assert::assertEquals(
5551
$category->getName(),
5652
$categoryView->getTitleBlock()->getTitle(),
57-
'Wrong page is displayed on ' . $store
53+
'Wrong category name is displayed for ' . $store
5854
);
5955
}
6056

@@ -65,6 +61,6 @@ public function processAssert(
6561
*/
6662
public function toString()
6763
{
68-
return 'Category with custom store visible on frontend.';
64+
return 'Category name is different on different store view.';
6965
}
7066
}

dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/Category/UpdateCategoryEntityTest.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
<constraint name="Magento\Catalog\Test\Constraint\AssertCategorySaveMessage" />
4747
<constraint name="Magento\Catalog\Test\Constraint\AssertCategoryForm" />
4848
</variation>
49-
<variation name="UpdateCategoryEntityTestVariation4">
49+
<variation name="UpdateCategoryEntityTestVariation4" summary="Update Category with custom Store View.">
5050
<data name="category/data/store_id/dataset" xsi:type="string">custom</data>
5151
<data name="category/data/name" xsi:type="string">Category %isolation%</data>
5252
<constraint name="Magento\Catalog\Test\Constraint\AssertCategorySaveMessage" />

dev/tests/functional/tests/app/Magento/Catalog/Test/etc/di.xml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,4 +151,9 @@
151151
<argument name="severity" xsi:type="string">high</argument>
152152
</arguments>
153153
</type>
154+
<type name="Magento\Catalog\Test\Constraint\AssertCategoryWithCustomStoreOnFrontend">
155+
<arguments>
156+
<argument name="severity" xsi:type="string">low</argument>
157+
</arguments>
158+
</type>
154159
</config>

0 commit comments

Comments
 (0)