Skip to content

Commit f94b181

Browse files
author
Alexander Akimov
authored
Merge pull request magento#3606 from magento-tsg/2.3-develop-pr40
[TSG] Upporting for 2.3 (pr40) (2.3.1)
2 parents e5c1527 + 5dd86b4 commit f94b181

File tree

10 files changed

+55
-19
lines changed

10 files changed

+55
-19
lines changed

app/code/Magento/Backend/Test/Mftf/Section/AdminMainActionsSection.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,6 @@
1212
<element name="save" type="button" selector="#save" timeout="30"/>
1313
<element name="saveAndContinue" type="button" selector="button[id*=save_and_continue]" timeout="30"/>
1414
<element name="delete" type="button" selector="#delete" timeout="30"/>
15+
<element name="add" type="button" selector="#add" timeout="30"/>
1516
</section>
1617
</sections>

app/code/Magento/ConfigurableProduct/view/adminhtml/web/js/components/price-configurable.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,8 @@ define([
5353
if (isConfigurable) {
5454
this.disable();
5555
this.clear();
56+
} else {
57+
this.enable();
5658
}
5759
}
5860
});

dev/tests/functional/tests/app/Magento/Backend/Test/TestCase/LoginAfterJSMinificationTest.php

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
use Magento\Backend\Test\Page\Adminhtml\Dashboard;
1010
use Magento\Mtf\Util\Command\Cli\DeployMode;
1111
use Magento\Mtf\TestStep\TestStepFactory;
12+
use Magento\User\Test\TestStep\LoginUserOnBackendStep;
1213

1314
/**
1415
* Verify visibility of form elements on Configuration page.
@@ -53,9 +54,11 @@ public function __inject(
5354
}
5455

5556
/**
56-
* Admin login test after JS minification is turned on in production mode
57+
* Admin login test after JS minification is turned on in production mode.
58+
*
5759
* @param DeployMode $cli
5860
* @param null $configData
61+
*
5962
* @return void
6063
*/
6164
public function test(
@@ -64,15 +67,26 @@ public function test(
6467
) {
6568
$this->configData = $configData;
6669

67-
//Pre-conditions
70+
//Pre-conditions
6871
$cli->setDeployModeToDeveloper();
69-
$this->objectManager->create(
72+
$this->stepFactory->create(
7073
\Magento\Config\Test\TestStep\SetupConfigurationStep::class,
7174
['configData' => $this->configData]
7275
)->run();
7376

7477
// Steps
7578
$cli->setDeployModeToProduction();
76-
$this->adminDashboardPage->open();
79+
$this->stepFactory->create(LoginUserOnBackendStep::class)->run();
80+
}
81+
82+
/**
83+
* @inheritdoc
84+
*/
85+
protected function tearDown()
86+
{
87+
$this->stepFactory->create(
88+
\Magento\Config\Test\TestStep\SetupConfigurationStep::class,
89+
['configData' => $this->configData]
90+
)->cleanup();
7791
}
7892
}

dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Search.php

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
use Magento\Mtf\Client\Locator;
1111

1212
/**
13-
* Class Search
1413
* Block for "Search" section
1514
*/
1615
class Search extends Block
@@ -77,6 +76,7 @@ public function search($keyword, $length = null)
7776
$keyword = substr($keyword, 0, $length);
7877
}
7978
$this->fillSearch($keyword);
79+
$this->waitForElementEnabled($this->searchButton);
8080
$this->_rootElement->find($this->searchButton)->click();
8181
}
8282

@@ -157,4 +157,24 @@ public function clickSuggestedText($text)
157157
$searchAutocomplete = sprintf($this->searchAutocomplete, $text);
158158
$this->_rootElement->find($searchAutocomplete, Locator::SELECTOR_XPATH)->click();
159159
}
160+
161+
/**
162+
* Wait for element is enabled.
163+
*
164+
* @param string $selector
165+
* @param string $strategy
166+
* @return bool|null
167+
*/
168+
public function waitForElementEnabled($selector, $strategy = Locator::SELECTOR_CSS)
169+
{
170+
$browser = $this->browser;
171+
172+
return $browser->waitUntil(
173+
function () use ($browser, $selector, $strategy) {
174+
$element = $browser->find($selector, $strategy);
175+
176+
return !$element->isDisabled() ? true : null;
177+
}
178+
);
179+
}
160180
}

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,5 +143,6 @@ protected function clearDownloadableData()
143143
/** @var Downloadable $downloadableInfoTab */
144144
$downloadableInfoTab = $this->catalogProductEdit->getProductForm()->getSection('downloadable_information');
145145
$downloadableInfoTab->getDownloadableBlock('Links')->clearDownloadableData();
146+
$downloadableInfoTab->setIsDownloadable('No');
146147
}
147148
}

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

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
<data name="productOrigin" xsi:type="string">catalogProductSimple::default</data>
1212
<data name="product" xsi:type="string">configurableProduct::default</data>
1313
<data name="actionName" xsi:type="string">-</data>
14-
<data name="tag" xsi:type="string">to_maintain:yes</data>
1514
<constraint name="Magento\Catalog\Test\Constraint\AssertProductSaveMessage" />
1615
<constraint name="Magento\Catalog\Test\Constraint\AssertProductInGrid" />
1716
<constraint name="Magento\ConfigurableProduct\Test\Constraint\AssertChildProductsInGrid" />
@@ -21,15 +20,13 @@
2120
<constraint name="Magento\ConfigurableProduct\Test\Constraint\AssertChildProductIsNotDisplayedSeparately" />
2221
</variation>
2322
<variation name="ProductTypeSwitchingOnUpdateTestVariation2">
24-
<data name="tag" xsi:type="string">to_maintain:yes</data>
2523
<data name="productOrigin" xsi:type="string">catalogProductSimple::default</data>
2624
<data name="product" xsi:type="string">catalogProductVirtual::default</data>
2725
<data name="actionName" xsi:type="string">-</data>
2826
<constraint name="Magento\Catalog\Test\Constraint\AssertProductSaveMessage" />
2927
<constraint name="Magento\Catalog\Test\Constraint\AssertProductInGrid" />
3028
</variation>
3129
<variation name="ProductTypeSwitchingOnUpdateTestVariation3">
32-
<data name="tag" xsi:type="string">stable:no</data>
3330
<data name="productOrigin" xsi:type="string">configurableProduct::default</data>
3431
<data name="product" xsi:type="string">catalogProductSimple::product_without_category</data>
3532
<data name="actionName" xsi:type="string">deleteVariations</data>
@@ -40,12 +37,10 @@
4037
<data name="productOrigin" xsi:type="string">configurableProduct::default</data>
4138
<data name="product" xsi:type="string">catalogProductVirtual::required_fields</data>
4239
<data name="actionName" xsi:type="string">deleteVariations</data>
43-
<data name="tag" xsi:type="string">to_maintain:yes</data>
4440
<constraint name="Magento\Catalog\Test\Constraint\AssertProductSaveMessage" />
4541
<constraint name="Magento\Catalog\Test\Constraint\AssertProductInGrid" />
4642
</variation>
4743
<variation name="ProductTypeSwitchingOnUpdateTestVariation5">
48-
<data name="tag" xsi:type="string">to_maintain:yes</data>
4944
<data name="productOrigin" xsi:type="string">catalogProductVirtual::default</data>
5045
<data name="product" xsi:type="string">catalogProductSimple::default</data>
5146
<data name="actionName" xsi:type="string">-</data>
@@ -56,7 +51,6 @@
5651
<data name="productOrigin" xsi:type="string">catalogProductVirtual::default</data>
5752
<data name="product" xsi:type="string">configurableProduct::not_virtual_for_type_switching</data>
5853
<data name="actionName" xsi:type="string">-</data>
59-
<data name="tag" xsi:type="string">to_maintain:yes</data>
6054
<constraint name="Magento\Catalog\Test\Constraint\AssertProductSaveMessage" />
6155
<constraint name="Magento\Catalog\Test\Constraint\AssertProductInGrid" />
6256
<constraint name="Magento\ConfigurableProduct\Test\Constraint\AssertChildProductsInGrid" />
@@ -69,7 +63,6 @@
6963
<data name="productOrigin" xsi:type="string">catalogProductVirtual::default</data>
7064
<data name="product" xsi:type="string">downloadableProduct::default</data>
7165
<data name="actionName" xsi:type="string">-</data>
72-
<data name="tag" xsi:type="string">to_maintain:yes</data>
7366
<constraint name="Magento\Catalog\Test\Constraint\AssertProductSaveMessage" />
7467
<constraint name="Magento\Catalog\Test\Constraint\AssertProductInGrid" />
7568
<constraint name="Magento\Downloadable\Test\Constraint\AssertDownloadableProductForm" />
@@ -81,15 +74,13 @@
8174
<data name="productOrigin" xsi:type="string">downloadableProduct::default</data>
8275
<data name="product" xsi:type="string">catalogProductSimple::default</data>
8376
<data name="actionName" xsi:type="string">-</data>
84-
<data name="tag" xsi:type="string">to_maintain:yes</data>
8577
<constraint name="Magento\Catalog\Test\Constraint\AssertProductSaveMessage" />
8678
<constraint name="Magento\Catalog\Test\Constraint\AssertProductInGrid" />
8779
</variation>
8880
<variation name="ProductTypeSwitchingOnUpdateTestVariation9">
8981
<data name="productOrigin" xsi:type="string">downloadableProduct::default</data>
9082
<data name="product" xsi:type="string">configurableProduct::not_virtual_for_type_switching</data>
91-
<data name="actionName" xsi:type="string">-</data>
92-
<data name="tag" xsi:type="string">to_maintain:yes</data>
83+
<data name="actionName" xsi:type="string">clearDownloadableData</data>
9384
<constraint name="Magento\Catalog\Test\Constraint\AssertProductSaveMessage" />
9485
<constraint name="Magento\Catalog\Test\Constraint\AssertProductInGrid" />
9586
<constraint name="Magento\ConfigurableProduct\Test\Constraint\AssertChildProductsInGrid" />
@@ -99,7 +90,6 @@
9990
<constraint name="Magento\ConfigurableProduct\Test\Constraint\AssertChildProductIsNotDisplayedSeparately" />
10091
</variation>
10192
<variation name="ProductTypeSwitchingOnUpdateTestVariation10">
102-
<data name="tag" xsi:type="string">stable:no</data>
10393
<data name="productOrigin" xsi:type="string">downloadableProduct::default</data>
10494
<data name="product" xsi:type="string">catalogProductVirtual::default</data>
10595
<data name="actionName" xsi:type="string">clearDownloadableData</data>
@@ -110,7 +100,6 @@
110100
<data name="productOrigin" xsi:type="string">catalogProductSimple::default</data>
111101
<data name="product" xsi:type="string">downloadableProduct::default</data>
112102
<data name="actionName" xsi:type="string">-</data>
113-
<data name="tag" xsi:type="string">to_maintain:yes</data>
114103
<constraint name="Magento\Catalog\Test\Constraint\AssertProductSaveMessage" />
115104
<constraint name="Magento\Catalog\Test\Constraint\AssertProductInGrid" />
116105
<constraint name="Magento\Downloadable\Test\Constraint\AssertDownloadableProductForm" />

dev/tests/functional/tests/app/Magento/Sales/Test/TestCase/GridSortingTest.xml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
<testCase name="Magento\Ui\Test\TestCase\GridSortingTest" summary="Grid UI Component Sorting" ticketId="MAGETWO-41328">
1010
<variation name="SalesOrderGridSorting">
1111
<data name="tag" xsi:type="string">severity:S2</data>
12-
<data name="tag" xsi:type="string">to_maintain:yes</data>
1312
<data name="description" xsi:type="string">Verify sales order grid storting</data>
1413
<data name="steps" xsi:type="array">
1514
<item name="0" xsi:type="string">-</item>

dev/tests/functional/tests/app/Magento/SalesRule/Test/Block/Adminhtml/Promo/Quote/Edit/PromoQuoteForm.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,13 @@ class PromoQuoteForm extends FormSections
2828
*/
2929
protected $waitForSelectorVisible = false;
3030

31+
/**
32+
* Selector of name element on the form.
33+
*
34+
* @var string
35+
*/
36+
private $nameElementSelector = 'input[name=name]';
37+
3138
/**
3239
* Fill form with sections.
3340
*
@@ -38,6 +45,8 @@ class PromoQuoteForm extends FormSections
3845
*/
3946
public function fill(FixtureInterface $fixture, SimpleElement $element = null, array $replace = null)
4047
{
48+
$this->waitForElementNotVisible($this->waitForSelector);
49+
$this->waitForElementVisible($this->nameElementSelector);
4150
$sections = $this->getFixtureFieldsByContainers($fixture);
4251
if ($replace) {
4352
$sections = $this->prepareData($sections, $replace);

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ public function resetFilter()
181181
*
182182
* @return void
183183
*/
184-
protected function waitFilterToLoad()
184+
public function waitFilterToLoad()
185185
{
186186
$this->getTemplateBlock()->waitLoader();
187187
$browser = $this->_rootElement;

dev/tests/functional/tests/app/Magento/Ui/Test/TestCase/GridSortingTest.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,7 @@ public function test(
8989
$page->open();
9090
/** @var DataGrid $gridBlock */
9191
$gridBlock = $page->$gridRetriever();
92+
$gridBlock->waitFilterToLoad();
9293
$gridBlock->resetFilter();
9394

9495
$sortingResults = [];

0 commit comments

Comments
 (0)