File tree Expand file tree Collapse file tree 1 file changed +24
-0
lines changed
dev/tests/functional/tests/app/Magento/Cms/Test/Block Expand file tree Collapse file tree 1 file changed +24
-0
lines changed Original file line number Diff line number Diff line change @@ -50,6 +50,13 @@ class Page extends Block
50
50
'CMS Static Block ' => './/*/div[contains(@class,"widget static block") and contains(.,"%s")] ' ,
51
51
];
52
52
53
+ /**
54
+ * Selector for uninitialized page.
55
+ *
56
+ * @var string
57
+ */
58
+ protected $ uninitialized = '//body[(@data-mage-init)] ' ;
59
+
53
60
/**
54
61
* Get page content text.
55
62
*
@@ -107,4 +114,21 @@ public function isWidgetVisible($widgetType, $widgetText)
107
114
throw new \Exception ('Determine how to find the widget on the page. ' );
108
115
}
109
116
}
117
+
118
+ /**
119
+ * Waiting page initialization.
120
+ *
121
+ * @return void
122
+ */
123
+ public function waitPageInit ()
124
+ {
125
+ $ browser = $ this ->browser ;
126
+ $ uninitialized = $ this ->uninitialized ;
127
+
128
+ $ this ->_rootElement ->waitUntil (
129
+ function () use ($ browser , $ uninitialized ) {
130
+ return $ browser ->find ($ uninitialized , Locator::SELECTOR_XPATH )->isVisible () == false ? true : null ;
131
+ }
132
+ );
133
+ }
110
134
}
You can’t perform that action at this time.
0 commit comments