File tree Expand file tree Collapse file tree 1 file changed +21
-6
lines changed
dev/tests/functional/tests/app/Magento/CatalogRule/Test/Block/Adminhtml/Promo/Catalog/Edit Expand file tree Collapse file tree 1 file changed +21
-6
lines changed Original file line number Diff line number Diff line change 6
6
7
7
namespace Magento \CatalogRule \Test \Block \Adminhtml \Promo \Catalog \Edit ;
8
8
9
- use \ Magento \Ui \Test \Block \Adminhtml \ FormSections ;
10
- use Magento \Mtf \Client \Element \ SimpleElement ;
9
+ use Magento \Backend \Test \Block \Template ;
10
+ use Magento \Mtf \Client \Locator ;
11
11
use Magento \Mtf \Fixture \FixtureInterface ;
12
+ use Magento \Mtf \Client \Element \SimpleElement ;
13
+ use Magento \Ui \Test \Block \Adminhtml \FormSections ;
12
14
13
15
/**
14
16
* Form for creation of a Catalog Price Rule.
15
17
*/
16
18
class PromoForm extends FormSections
17
19
{
18
20
/**
19
- * Magento form loader .
21
+ * Selector for template block .
20
22
*
21
23
* @var string
22
24
*/
23
- protected $ spinner = '[data-role="spinner"] ' ;
24
-
25
+ private $ templateBlockSelector = './ancestor::body ' ;
26
+
25
27
/**
26
28
* Fill form with tabs.
27
29
*
@@ -72,6 +74,19 @@ protected function prepareData(array $tabs, array $replace)
72
74
protected function waitPageToLoad ()
73
75
{
74
76
$ this ->waitForElementVisible ($ this ->header );
75
- $ this ->waitForElementNotVisible ($ this ->spinner );
77
+ $ this ->getTemplateBlock ()->waitLoader ();
78
+ }
79
+
80
+ /**
81
+ * Get template block.
82
+ *
83
+ * @return Template
84
+ */
85
+ protected function getTemplateBlock ()
86
+ {
87
+ return $ this ->blockFactory ->create (
88
+ Template::class,
89
+ ['element ' => $ this ->_rootElement ->find ($ this ->templateBlockSelector , Locator::SELECTOR_XPATH )]
90
+ );
76
91
}
77
92
}
You can’t perform that action at this time.
0 commit comments