Skip to content

Commit 7e9194a

Browse files
committed
MTA-4014: Update extended functional tests suite for Cloud plan
1 parent 17e0f2b commit 7e9194a

File tree

16 files changed

+128
-55
lines changed

16 files changed

+128
-55
lines changed

dev/tests/functional/composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"require": {
3-
"magento/mtf": "1.0.0-rc43",
3+
"magento/mtf": "1.0.0-rc47",
44
"php": "~5.6.5|7.0.2|7.0.4|~7.0.6",
55
"phpunit/phpunit": "4.1.0",
66
"phpunit/phpunit-selenium": ">=1.2"

dev/tests/functional/tests/app/Magento/Backend/Test/Block/FormPageActions.php

Lines changed: 7 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ public function back()
8585
*/
8686
public function reset()
8787
{
88-
$this->waitBeforeClick();
88+
$this->waitForElementVisible($this->resetButton);
8989
$this->_rootElement->find($this->resetButton)->click();
9090
}
9191

@@ -94,7 +94,7 @@ public function reset()
9494
*/
9595
public function saveAndContinue()
9696
{
97-
$this->waitBeforeClick();
97+
$this->waitForElementVisible($this->saveAndContinueButton);
9898
$this->_rootElement->find($this->saveAndContinueButton)->click();
9999
$this->waitForElementNotVisible('.popup popup-loading');
100100
$this->waitForElementNotVisible('.loader');
@@ -105,7 +105,7 @@ public function saveAndContinue()
105105
*/
106106
public function save()
107107
{
108-
$this->waitBeforeClick();
108+
$this->waitForElementVisible($this->saveButton);
109109
$this->_rootElement->find($this->saveButton)->click();
110110
$this->waitForElementNotVisible($this->spinner);
111111
$this->waitForElementNotVisible($this->loader, Locator::SELECTOR_XPATH);
@@ -117,7 +117,10 @@ public function save()
117117
*/
118118
public function delete()
119119
{
120-
$this->waitBeforeClick();
120+
$this->waitForElementNotVisible($this->spinner);
121+
$this->waitForElementNotVisible($this->loader, Locator::SELECTOR_XPATH);
122+
$this->waitForElementNotVisible($this->loaderOld, Locator::SELECTOR_XPATH);
123+
$this->waitForElementVisible($this->deleteButton);
121124
$this->_rootElement->find($this->deleteButton)->click();
122125
}
123126

@@ -130,16 +133,4 @@ public function checkDeleteButton()
130133
{
131134
return $this->_rootElement->find($this->deleteButton)->isVisible();
132135
}
133-
134-
/**
135-
* Wait for User before clicking any Button which calls JS validation on correspondent form.
136-
* See details in MAGETWO-31121.
137-
*
138-
* @return void
139-
*/
140-
protected function waitBeforeClick()
141-
{
142-
time_nanosleep(0, 600000000);
143-
usleep(1000000);
144-
}
145136
}

dev/tests/functional/tests/app/Magento/Backend/Test/Block/Widget/Grid.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ abstract class Grid extends Block
158158
*
159159
* @var string
160160
*/
161-
protected $loader = '[data-role="spinner"]';
161+
protected $loader = '.admin__data-grid-outer-wrap [data-role="spinner"]';
162162

163163
/**
164164
* Locator for next page action
@@ -293,7 +293,7 @@ public function searchAndSelect(array $filter)
293293
if ($selectItem->isVisible()) {
294294
$selectItem->click();
295295
} else {
296-
throw new \Exception('Searched item was not found.');
296+
throw new \Exception("Searched item was not found by filter\n" . print_r($filter, true));
297297
}
298298
}
299299

@@ -467,6 +467,7 @@ public function isFirstRowVisible()
467467
*/
468468
public function openFirstRow()
469469
{
470+
$this->waitLoader();
470471
$this->_rootElement->find($this->firstRowSelector, Locator::SELECTOR_XPATH)->click();
471472
}
472473

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

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -153,11 +153,6 @@
153153
<url_key/>
154154
</fields>
155155
</search-engine-optimization>
156-
<related>
157-
<class>\Magento\Ui\Test\Block\Adminhtml\Section</class>
158-
<selector>[data-index='related']</selector>
159-
<strategy>css selector</strategy>
160-
</related>
161156
<websites>
162157
<class>\Magento\Ui\Test\Block\Adminhtml\Section</class>
163158
<selector>[data-index='websites']</selector>

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

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@
66

77
namespace Magento\Catalog\Test\TestCase\Product;
88

9-
use Magento\Mtf\Fixture\InjectableFixture;
10-
119
/**
1210
* Preconditions:
1311
* 1. Create products.

dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/ProductAttribute/CreateProductAttributeEntityTest.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@
110110
<constraint name="Magento\Catalog\Test\Constraint\AssertAttributeOptionsOnProductForm" />
111111
</variation>
112112
<variation name="CreateProductAttributeEntityTestVariation6">
113-
<data name="tag" xsi:type="string">test_type:extended_acceptance_test</data>
113+
<data name="tag" xsi:type="string">test_type:extended_acceptance_test, to_maintain:yes</data>
114114
<data name="attributeSet/dataset" xsi:type="string">custom_attribute_set</data>
115115
<data name="productAttribute/data/frontend_label" xsi:type="string">Dropdown_Admin_%isolation%</data>
116116
<data name="productAttribute/data/frontend_input" xsi:type="string">Dropdown</data>

dev/tests/functional/tests/app/Magento/CatalogRule/Test/TestCase/ApplySeveralCatalogPriceRuleEntityTest.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\CatalogRule\Test\TestCase\ApplySeveralCatalogPriceRuleEntityTest" summary="Apply Several Catalog Price Rules " ticketId="MAGETWO-24780">
1010
<variation name="ApplySeveralCatalogRules_Sequentially">
11-
<data name="tag" xsi:type="string">test_type:extended_acceptance_test</data>
11+
<data name="tag" xsi:type="string">test_type:extended_acceptance_test, to_maintain:yes</data>
1212
<data name="catalogRulesOriginal/priority_0" xsi:type="string">catalog_price_rule_priority_0</data>
1313
<data name="catalogRulesOriginal/priority_1" xsi:type="string">-</data>
1414
<data name="catalogRulesOriginal/priority_2" xsi:type="string">catalog_price_rule_priority_2</data>

dev/tests/functional/tests/app/Magento/CatalogRule/Test/TestCase/CreateCatalogRuleTest.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
<constraint name="Magento\CatalogRule\Test\Constraint\AssertCatalogPriceRuleAppliedShoppingCart" />
3030
</variation>
3131
<variation name="CatalogRule_Create_ForNewCustomerGroup_ApplyAsPercentage" summary="Apply Catalog Price Rules to Specific Customer Group" ticketId="MAGETWO-12908">
32-
<data name="tag" xsi:type="string">test_type:acceptance_test, test_type:extended_acceptance_test</data>
32+
<data name="tag" xsi:type="string">test_type:acceptance_test, test_type:extended_acceptance_test, to_maintain:yes</data>
3333
<data name="customer/dataset" xsi:type="string">customer_with_new_customer_group</data>
3434
<data name="product" xsi:type="string">simple_10_dollar</data>
3535
<data name="catalogPriceRule/data/name" xsi:type="string">rule_name%isolation%</data>
@@ -54,7 +54,7 @@
5454
<constraint name="Magento\CatalogRule\Test\Constraint\AssertCatalogPriceRuleAppliedShoppingCart" />
5555
</variation>
5656
<variation name="CatalogRule_Create_ForGuestUsers_ByProductAttribute_AdjustPriceToValue" summary="Create and Apply Catalog Price Rule with Product Attribute in Condition" ticketId="MAGETWO-30095">
57-
<data name="tag" xsi:type="string">test_type:extended_acceptance_test</data>
57+
<data name="tag" xsi:type="string">test_type:extended_acceptance_test, to_maintain:yes</data>
5858
<data name="product" xsi:type="string">product_with_custom_color_attribute</data>
5959
<data name="catalogPriceRule/data/name" xsi:type="string">Catalog Price Rule %isolation%</data>
6060
<data name="catalogPriceRule/data/is_active" xsi:type="string">Active</data>

dev/tests/functional/tests/app/Magento/CatalogRule/Test/TestCase/UpdateCatalogPriceRuleEntityTest.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
<constraint name="Magento\CatalogRule\Test\Constraint\AssertCatalogPriceRuleNotAppliedProductPage" />
2020
</variation>
2121
<variation name="CatalogRule_Update_Name_Description_Status_Conditions_Action_DiscountAmount">
22-
<data name="tag" xsi:type="string">test_type:extended_acceptance_test</data>
22+
<data name="tag" xsi:type="string">test_type:extended_acceptance_test, to_maintain:yes</data>
2323
<data name="catalogPriceRuleOriginal/dataset" xsi:type="string">active_catalog_price_rule_with_conditions</data>
2424
<data name="catalogPriceRule/data/name" xsi:type="string">New Catalog Price Rule Name %isolation%</data>
2525
<data name="catalogPriceRule/data/description" xsi:type="string">New Catalog Price Rule Description %isolation%</data>

dev/tests/functional/tests/app/Magento/SalesRule/Test/TestStep/CreateSalesRuleStep.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,6 @@ public function run()
5959
{
6060
$result['salesRule'] = null;
6161
if ($this->salesRule !== null) {
62-
$this->deleteAllSalesRule->run();
6362
$salesRule = $this->fixtureFactory->createByCode(
6463
'salesRule',
6564
['dataset' => $this->salesRule]

0 commit comments

Comments
 (0)