Skip to content

Commit 3d49962

Browse files
author
Oleksii Kolesnyk
committed
MTA-2726: Functional test maintenance. Part 3
1 parent bccd506 commit 3d49962

File tree

7 files changed

+12
-48
lines changed

7 files changed

+12
-48
lines changed

dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Adminhtml/Product/Edit/Tab/Attributes/Search.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ class Search extends SuggestElement
2020
*
2121
* @var string
2222
*/
23-
protected $topPage = './ancestor::body//header[contains(@class, "page-header")]/div[1]';
23+
protected $topPage = './ancestor::body//header';
2424

2525
/**
2626
* Attributes locator.
@@ -80,7 +80,7 @@ public function getValue()
8080
*/
8181
public function isExistAttributeInSearchResult($productAttribute)
8282
{
83-
$this->find($this->topPage, Locator::SELECTOR_XPATH)->click();
83+
$this->find($this->topPage, Locator::SELECTOR_XPATH)->hover();
8484
$this->find($this->actionToggle)->click();
8585

8686
return $this->isExistValueInSearchResult($productAttribute->getFrontendLabel());

dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Adminhtml/Product/ProductForm.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
</tax_class_id>
3030
<product_has_weight>
3131
<selector>[name="product[product_has_weight]"]</selector>
32-
<input>checkbox</input>
32+
<input>radiobutton</input>
3333
</product_has_weight>
3434
<category_ids>
3535
<selector>#attribute-category_ids-container</selector>

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
<constraint name="Magento\Catalog\Test\Constraint\AssertProductCompareBlockOnCmsPage" />
2929
</variation>
3030
<variation name="AddCompareProductsTestVariation4">
31-
<data name="products" xsi:type="string">catalogProductSimple::simple_for_composite_products,catalogProductVirtual::default,downloadableProduct::default,groupedProduct::grouped_product_with_price,configurableProduct::default,bundleProduct::bundle_dynamic_product,bundleProduct::bundle_fixed_product</data>
31+
<data name="products" xsi:type="string">catalogProductSimple::simple_for_composite_products,catalogProductVirtual::default,downloadableProduct::default,groupedProduct::grouped_product_with_price,configurableProduct::configurable_with_qty_1,bundleProduct::bundle_dynamic_product,bundleProduct::bundle_fixed_product</data>
3232
<data name="isCustomerLoggedIn" xsi:type="string">Yes</data>
3333
<constraint name="Magento\Catalog\Test\Constraint\AssertProductCompareItemsLink" />
3434
<constraint name="Magento\Catalog\Test\Constraint\AssertProductComparePage" />

dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/Product/ProductTypeSwitchingOnCreationTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,10 +81,10 @@ public function __inject(
8181
public function test($createProduct, $product)
8282
{
8383
// Steps
84-
$this->catalogProductIndex->open();
85-
$this->catalogProductIndex->getGridPageActionBlock()->addProduct($createProduct);
8684
list($fixture, $dataset) = explode('::', $product);
8785
$product = $this->fixtureFactory->createByCode($fixture, ['dataset' => $dataset]);
86+
$this->catalogProductIndex->open();
87+
$this->catalogProductIndex->getGridPageActionBlock()->addProduct($createProduct);
8888
$this->catalogProductNew->getProductForm()->fill($product);
8989
$this->catalogProductNew->getFormPageActions()->save($product);
9090

dev/tests/functional/tests/app/Magento/CatalogSearch/Test/TestCase/AdvancedSearchEntityTest.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@
113113
</variation>
114114
<variation name="AdvancedSearchEntityTestVariation14">
115115
<data name="description" xsi:type="string">Negative product search</data>
116-
<data name="productSearch/data/name" xsi:type="string">Negative_product_search</data>
116+
<data name="productSearch/data/name" xsi:type="string">TryToFindMeAndI&#39;llFindYOU</data>
117117
<constraint name="Magento\CatalogSearch\Test\Constraint\AssertAdvancedSearchNoResult" />
118118
</variation>
119119
</testCase>

dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/Repository/ConfigurableProduct.xml

Lines changed: 0 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,6 @@
1010
<dataset name="default">
1111
<field name="name" xsi:type="string">Test configurable product %isolation%</field>
1212
<field name="sku" xsi:type="string">sku_test_configurable_product_%isolation%</field>
13-
<field name="price" xsi:type="array">
14-
<item name="value" xsi:type="string">120</item>
15-
</field>
1613
<field name="weight" xsi:type="string">30</field>
1714
<field name="product_has_weight" xsi:type="string">Yes</field>
1815
<field name="status" xsi:type="string">Product online</field>
@@ -41,9 +38,6 @@
4138
<dataset name="configurable_with_qty_1">
4239
<field name="name" xsi:type="string">Test configurable product %isolation%</field>
4340
<field name="sku" xsi:type="string">sku_test_configurable_product_%isolation%</field>
44-
<field name="price" xsi:type="array">
45-
<item name="value" xsi:type="string">40</item>
46-
</field>
4741
<field name="weight" xsi:type="string">30</field>
4842
<field name="product_has_weight" xsi:type="string">Yes</field>
4943
<field name="status" xsi:type="string">Product online</field>
@@ -72,9 +66,6 @@
7266
<dataset name="product_with_special_price">
7367
<field name="name" xsi:type="string">Test configurable product %isolation%</field>
7468
<field name="sku" xsi:type="string">sku_test_configurable_product_%isolation%</field>
75-
<field name="price" xsi:type="array">
76-
<item name="value" xsi:type="string">10</item>
77-
</field>
7869
<field name="special_price" xsi:type="string">9</field>
7970
<field name="weight" xsi:type="string">5</field>
8071
<field name="product_has_weight" xsi:type="string">Yes</field>
@@ -104,9 +95,6 @@
10495
<dataset name="product_with_size">
10596
<field name="name" xsi:type="string">Test configurable product with size %isolation%</field>
10697
<field name="sku" xsi:type="string">sku_test_configurable_product_%isolation%</field>
107-
<field name="price" xsi:type="array">
108-
<item name="value" xsi:type="string">120</item>
109-
</field>
11098
<field name="weight" xsi:type="string">30</field>
11199
<field name="product_has_weight" xsi:type="string">Yes</field>
112100
<field name="status" xsi:type="string">Product online</field>
@@ -135,9 +123,6 @@
135123
<dataset name="product_with_color_and_size">
136124
<field name="name" xsi:type="string">Test configurable product with color and size %isolation%</field>
137125
<field name="sku" xsi:type="string">sku_test_configurable_product_%isolation%</field>
138-
<field name="price" xsi:type="array">
139-
<item name="value" xsi:type="string">120</item>
140-
</field>
141126
<field name="weight" xsi:type="string">30</field>
142127
<field name="product_has_weight" xsi:type="string">Yes</field>
143128
<field name="status" xsi:type="string">Product online</field>
@@ -166,9 +151,6 @@
166151
<dataset name="one_variation">
167152
<field name="name" xsi:type="string">Test configurable product %isolation%</field>
168153
<field name="sku" xsi:type="string">sku_test_configurable_product_%isolation%</field>
169-
<field name="price" xsi:type="array">
170-
<item name="value" xsi:type="string">120</item>
171-
</field>
172154
<field name="weight" xsi:type="string">30</field>
173155
<field name="product_has_weight" xsi:type="string">Yes</field>
174156
<field name="status" xsi:type="string">Product online</field>
@@ -194,9 +176,6 @@
194176
<dataset name="not_virtual_for_type_switching">
195177
<field name="name" xsi:type="string">Test configurable product %isolation%</field>
196178
<field name="sku" xsi:type="string">sku_test_configurable_product_%isolation%</field>
197-
<field name="price" xsi:type="array">
198-
<item name="value" xsi:type="string">120</item>
199-
</field>
200179
<field name="weight" xsi:type="string">30</field>
201180
<field name="product_has_weight" xsi:type="string">Yes</field>
202181
<field name="status" xsi:type="string">Product online</field>
@@ -225,9 +204,6 @@
225204
<dataset name="with_one_option">
226205
<field name="name" xsi:type="string">Test configurable product %isolation%</field>
227206
<field name="sku" xsi:type="string">sku_test_configurable_product_%isolation%</field>
228-
<field name="price" xsi:type="array">
229-
<item name="value" xsi:type="string">10</item>
230-
</field>
231207
<field name="weight" xsi:type="string">30</field>
232208
<field name="product_has_weight" xsi:type="string">Yes</field>
233209
<field name="status" xsi:type="string">Product online</field>
@@ -256,9 +232,6 @@
256232
<dataset name="with_out_of_stock_item">
257233
<field name="name" xsi:type="string">Test configurable product %isolation%</field>
258234
<field name="sku" xsi:type="string">sku_test_configurable_product_%isolation%</field>
259-
<field name="price" xsi:type="array">
260-
<item name="value" xsi:type="string">120</item>
261-
</field>
262235
<field name="weight" xsi:type="string">30</field>
263236
<field name="product_has_weight" xsi:type="string">Yes</field>
264237
<field name="status" xsi:type="string">Product online</field>
@@ -285,9 +258,6 @@
285258
<field name="name" xsi:type="string">Configurable product %isolation%</field>
286259
<field name="url_key" xsi:type="string">test-configurable-product-%isolation%</field>
287260
<field name="sku" xsi:type="string">sku_configurable_product_%isolation%</field>
288-
<field name="price" xsi:type="array">
289-
<item name="value" xsi:type="string">10</item>
290-
</field>
291261
<field name="tax_class_id" xsi:type="array">
292262
<item name="dataset" xsi:type="string">taxable_goods</item>
293263
</field>
@@ -318,9 +288,6 @@
318288
<field name="name" xsi:type="string">Configurable product %isolation%</field>
319289
<field name="url_key" xsi:type="string">test-configurable-product-%isolation%</field>
320290
<field name="sku" xsi:type="string">sku_configurable_product_%isolation%</field>
321-
<field name="price" xsi:type="array">
322-
<item name="value" xsi:type="string">10</item>
323-
</field>
324291
<field name="tax_class_id" xsi:type="array">
325292
<item name="dataset" xsi:type="string">taxable_goods</item>
326293
</field>
@@ -343,9 +310,6 @@
343310
<dataset name="filterable_two_options_with_zero_price">
344311
<field name="name" xsi:type="string">Test configurable product %isolation%</field>
345312
<field name="sku" xsi:type="string">sku_test_configurable_product_%isolation%</field>
346-
<field name="price" xsi:type="array">
347-
<item name="value" xsi:type="string">10</item>
348-
</field>
349313
<field name="weight" xsi:type="string">1</field>
350314
<field name="product_has_weight" xsi:type="string">Yes</field>
351315
<field name="status" xsi:type="string">Product online</field>
@@ -373,9 +337,6 @@
373337
<field name="name" xsi:type="string">Configurable product %isolation%</field>
374338
<field name="url_key" xsi:type="string">test-configurable-product-%isolation%</field>
375339
<field name="sku" xsi:type="string">sku_configurable_product_%isolation%</field>
376-
<field name="price" xsi:type="array">
377-
<item name="value" xsi:type="string">10</item>
378-
</field>
379340
<field name="tax_class_id" xsi:type="array">
380341
<item name="dataset" xsi:type="string">taxable_goods</item>
381342
</field>

dev/tests/functional/tests/app/Magento/Ui/Test/Block/Adminhtml/DataGrid.php

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -283,12 +283,15 @@ public function massaction(array $items, $action, $acceptAlert = false, $massAct
283283
* Select items without using grid search.
284284
*
285285
* @param array $items
286+
* @param bool $isSortable
286287
* @return void
287288
* @throws \Exception
288289
*/
289-
public function selectItems(array $items)
290+
public function selectItems(array $items, $isSortable = true)
290291
{
291-
$this->sortGridByField('ID');
292+
if ($isSortable) {
293+
$this->sortGridByField('ID');
294+
}
292295
foreach ($items as $item) {
293296
$this->_rootElement->find($this->currentPage)->setValue('');
294297
$this->waitLoader();

0 commit comments

Comments
 (0)