Skip to content

Commit fd25d85

Browse files
author
Alexander Akimov
authored
Merge pull request #3673 from magento-tsg/2.3-develop-pr41
[TSG] Upporting for 2.3 (pr41) (2.3.1)
2 parents 9e07431 + 3aa8af8 commit fd25d85

File tree

31 files changed

+1973
-265
lines changed

31 files changed

+1973
-265
lines changed

dev/tests/functional/tests/app/Magento/GroupedProduct/Test/Block/Adminhtml/Product/Grouped/AssociatedProducts/Search/Grid.php

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,13 @@ class Grid extends DataGrid
2020
*/
2121
protected $addProducts = '.action-primary[data-role="action"]';
2222

23+
/**
24+
* Grid selector.
25+
*
26+
* @var string
27+
*/
28+
private $gridSelector = '[data-role="grid-wrapper"]';
29+
2330
/**
2431
* Filters array mapping
2532
*
@@ -40,4 +47,59 @@ public function addProducts()
4047
{
4148
$this->_rootElement->find($this->addProducts)->click();
4249
}
50+
51+
/**
52+
* @inheritdoc
53+
*/
54+
public function searchAndSelect(array $filter)
55+
{
56+
$this->waitGridVisible();
57+
$this->waitLoader();
58+
parent::searchAndSelect($filter);
59+
}
60+
61+
/**
62+
* @inheritdoc
63+
*/
64+
protected function waitLoader()
65+
{
66+
parent::waitLoader();
67+
$this->waitGridLoaderInvisible();
68+
}
69+
70+
/**
71+
* Wait for grid to appear.
72+
*
73+
* @return void
74+
*/
75+
private function waitGridVisible()
76+
{
77+
$browser = $this->_rootElement;
78+
$selector = $this->gridSelector;
79+
80+
return $browser->waitUntil(
81+
function () use ($browser, $selector) {
82+
$element = $browser->find($selector);
83+
return $element->isVisible() ? true : null;
84+
}
85+
);
86+
}
87+
88+
/**
89+
* Wait for grid spinner disappear.
90+
*
91+
* @return void
92+
*/
93+
private function waitGridLoaderInvisible()
94+
{
95+
$browser = $this->_rootElement;
96+
$selector = $this->loader;
97+
98+
return $browser->waitUntil(
99+
function () use ($browser, $selector) {
100+
$element = $browser->find($selector);
101+
return $element->isVisible() === false ? true : null;
102+
}
103+
);
104+
}
43105
}

dev/tests/functional/tests/app/Magento/GroupedProduct/Test/TestCase/CreateGroupedProductEntityTest.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/mtf/etc/variations.xsd">
99
<testCase name="Magento\GroupedProduct\Test\TestCase\CreateGroupedProductEntityTest" summary="Create Grouped Product" ticketId="MAGETWO-24877">
1010
<variation name="CreateGroupedProductEntityTestVariation1" summary="Create Grouped Product and Assign It to the Category" ticketId="MAGETWO-13610">
11-
<data name="tag" xsi:type="string">test_type:acceptance_test, test_type:extended_acceptance_test, stable:no</data>
11+
<data name="tag" xsi:type="string">test_type:acceptance_test, test_type:extended_acceptance_test</data>
1212
<data name="product/data/url_key" xsi:type="string">test-grouped-product-%isolation%</data>
1313
<data name="product/data/name" xsi:type="string">GroupedProduct %isolation%</data>
1414
<data name="product/data/sku" xsi:type="string">GroupedProduct_sku%isolation%</data>

dev/tests/integration/framework/Magento/TestFramework/TestCase/AbstractBackendController.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@
55
*/
66
namespace Magento\TestFramework\TestCase;
77

8-
use Magento\Framework\App\Request\Http as HttpRequest;
9-
108
/**
119
* A parent class for backend controllers - contains directives for admin user creation and authentication.
1210
*
@@ -122,7 +120,7 @@ public function testAclHasAccess()
122120
*/
123121
public function testAclNoAccess()
124122
{
125-
if ($this->resource === null) {
123+
if ($this->resource === null || $this->uri === null) {
126124
$this->markTestIncomplete('Acl test is not complete');
127125
}
128126
if ($this->httpMethod) {

dev/tests/integration/testsuite/Magento/BundleImportExport/Model/BundleTest.php

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,10 @@
99

1010
class BundleTest extends AbstractProductExportImportTestCase
1111
{
12-
public function exportImportDataProvider()
12+
/**
13+
* @return array
14+
*/
15+
public function exportImportDataProvider(): array
1316
{
1417
return [
1518
// @todo uncomment after MAGETWO-49677 resolved
@@ -45,17 +48,13 @@ public function exportImportDataProvider()
4548
];
4649
}
4750

48-
public function importReplaceDataProvider()
49-
{
50-
return $this->exportImportDataProvider();
51-
}
52-
5351
/**
54-
* @param \Magento\Catalog\Model\Product $expectedProduct
55-
* @param \Magento\Catalog\Model\Product $actualProduct
52+
* @inheritdoc
5653
*/
57-
protected function assertEqualsSpecificAttributes($expectedProduct, $actualProduct)
58-
{
54+
protected function assertEqualsSpecificAttributes(
55+
\Magento\Catalog\Model\Product $expectedProduct,
56+
\Magento\Catalog\Model\Product $actualProduct
57+
): void {
5958
$expectedBundleProductOptions = $expectedProduct->getExtensionAttributes()->getBundleProductOptions();
6059
$actualBundleProductOptions = $actualProduct->getExtensionAttributes()->getBundleProductOptions();
6160

0 commit comments

Comments
 (0)