13
13
use Magento \Mtf \TestCase \Injectable ;
14
14
15
15
/**
16
- * Test Flow:
17
- *
18
16
* Precondition:
19
17
* 1. Category is created.
20
18
* 2. Product is created and assigned to created category.
28
26
* 6. Perform asserts.
29
27
*
30
28
* @group Products_(MX)
31
- * @ZephyrId MAGETWO-23544
29
+ * @ZephyrId MAGETWO-23544, MAGETWO-21125
32
30
*/
33
31
class UpdateSimpleProductEntityTest extends Injectable
34
32
{
@@ -39,14 +37,14 @@ class UpdateSimpleProductEntityTest extends Injectable
39
37
/* end tags */
40
38
41
39
/**
42
- * Product page with a grid
40
+ * Product page with a grid.
43
41
*
44
42
* @var CatalogProductIndex
45
43
*/
46
44
protected $ productGrid ;
47
45
48
46
/**
49
- * Page to update a product
47
+ * Page to update a product.
50
48
*
51
49
* @var CatalogProductEdit
52
50
*/
@@ -60,7 +58,7 @@ class UpdateSimpleProductEntityTest extends Injectable
60
58
protected $ configData ;
61
59
62
60
/**
63
- * Injection data
61
+ * Injection data.
64
62
*
65
63
* @param CatalogProductIndex $productGrid
66
64
* @param CatalogProductEdit $editProductPage
@@ -75,7 +73,7 @@ public function __inject(
75
73
}
76
74
77
75
/**
78
- * Run update product simple entity test
76
+ * Run update product simple entity test.
79
77
*
80
78
* @param CatalogProductSimple $initialProduct
81
79
* @param CatalogProductSimple $product
@@ -93,12 +91,11 @@ public function test(CatalogProductSimple $initialProduct, CatalogProductSimple
93
91
$ category = $ product ->hasData ('category_ids ' ) && $ product ->getCategoryIds ()[0 ]
94
92
? $ product ->getDataFieldConfig ('category_ids ' )['source ' ]->getCategories ()[0 ]
95
93
: $ initialCategory ;
96
- if ($ configData ) {
97
- $ this ->objectManager ->create (
98
- 'Magento\Config\Test\TestStep\SetupConfigurationStep ' ,
99
- ['configData ' => $ configData ]
100
- )->run ();
101
- }
94
+
95
+ $ this ->objectManager ->create (
96
+ 'Magento\Config\Test\TestStep\SetupConfigurationStep ' ,
97
+ ['configData ' => $ configData ]
98
+ )->run ();
102
99
103
100
// Steps
104
101
$ filter = ['sku ' => $ initialProduct ->getSku ()];
@@ -112,7 +109,7 @@ public function test(CatalogProductSimple $initialProduct, CatalogProductSimple
112
109
}
113
110
114
111
/**
115
- * Clear data after test
112
+ * Clear data after test.
116
113
*
117
114
* @return void
118
115
*/
0 commit comments