Skip to content

Commit d61ecb5

Browse files
author
Oleksandr Manchenko
committed
MTA-1397: Update setValue() method for basic typified elements
- Updated wait load customer form
1 parent 83c4412 commit d61ecb5

File tree

1 file changed

+36
-0
lines changed
  • dev/tests/functional/tests/app/Magento/Customer/Test/Block/Adminhtml/Edit

1 file changed

+36
-0
lines changed

dev/tests/functional/tests/app/Magento/Customer/Test/Block/Adminhtml/Edit/CustomerForm.php

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
namespace Magento\Customer\Test\Block\Adminhtml\Edit;
88

99
use Magento\Backend\Test\Block\Widget\FormTabs;
10+
use Magento\Mtf\Client\Locator;
1011
use Magento\Mtf\Fixture\FixtureInterface;
1112
use Magento\Mtf\Fixture\InjectableFixture;
1213

@@ -29,6 +30,34 @@ class CustomerForm extends FormTabs
2930
*/
3031
protected $activeFormTab = '.entry-edit.form-inline [data-bind="visible: active"]:not([style="display: none;"])';
3132

33+
/**
34+
* Field label on customer form.
35+
*
36+
* @var string
37+
*/
38+
protected $fieldLabel = './/*[contains(@class, "form__field")]/*[contains(@class,"label")]';
39+
40+
/**
41+
* Field with absent label on customer form.
42+
*
43+
* @var string
44+
*/
45+
protected $fieldLabelAbsent = './/*[contains(@class, "form__field") and not(./*[contains(@class,"label")]/*)]';
46+
47+
/**
48+
* Wrapper for field on customer form.
49+
*
50+
* @var string
51+
*/
52+
protected $fieldWrapperControl = './/*[contains(@class, "form__field")]/*[contains(@class,"control")]';
53+
54+
/**
55+
* Wrapper with absent field on customer form.
56+
*
57+
* @var string
58+
*/
59+
protected $fieldWrapperControlAbsent = './/*[contains(@class, "form__field") and not(./input or ./*[contains(@class,"control")]/*)]';
60+
3261
/**
3362
* Fill Customer forms on tabs by customer, addresses data.
3463
*
@@ -103,5 +132,12 @@ protected function waitForm()
103132
{
104133
$this->waitForElementNotVisible($this->loader);
105134
$this->waitForElementVisible($this->activeFormTab);
135+
136+
$this->waitForElementVisible($this->fieldLabel, Locator::SELECTOR_XPATH);
137+
$this->waitForElementNotVisible($this->fieldLabelAbsent, Locator::SELECTOR_XPATH);
138+
$this->waitForElementVisible($this->fieldWrapperControl, Locator::SELECTOR_XPATH);
139+
$this->waitForElementNotVisible($this->fieldWrapperControlAbsent, Locator::SELECTOR_XPATH);
140+
141+
usleep(500000);
106142
}
107143
}

0 commit comments

Comments
 (0)