@@ -174,6 +174,13 @@ class Attribute extends Form
174
174
*/
175
175
private $ attributesGridSpinner = '.productFormConfigurable [data-role="spinner"] ' ;
176
176
177
+ /**
178
+ * CSS Selector for attribute grid.
179
+ *
180
+ * @var string
181
+ */
182
+ private $ attributesGridSelector = '#variation-steps-wizard_step1 .admin__data-grid-outer-wrap ' ;
183
+
177
184
/**
178
185
* Fill attributes
179
186
*
@@ -192,6 +199,7 @@ public function fillAttributes(array $attributes, ConfigurableAttributesData $at
192
199
}
193
200
194
201
//select attributes
202
+ $ this ->waitAttributesGridLoad ();
195
203
$ this ->getAttributesGrid ()->resetFilter ();
196
204
$ this ->getAttributesGrid ()->waitForElementNotVisible ($ this ->attributesGridSpinner );
197
205
$ this ->getTemplateBlock ()->waitLoader ();
@@ -220,14 +228,25 @@ public function fillAttributes(array $attributes, ConfigurableAttributesData $at
220
228
$ this ->browser ->find ($ this ->nextButton )->click ();
221
229
}
222
230
231
+ /**
232
+ * Wait for 'Attributes Grid' loaded.
233
+ *
234
+ * @return void
235
+ */
236
+ private function waitAttributesGridLoad ()
237
+ {
238
+ $ this ->waitForElementVisible ($ this ->attributesGridSelector );
239
+ $ this ->waitForElementNotVisible ($ this ->attributesGridSpinner );
240
+ }
241
+
223
242
/**
224
243
* @return \Magento\ConfigurableProduct\Test\Block\Adminhtml\Product\AttributesGrid
225
244
*/
226
245
public function getAttributesGrid ()
227
246
{
228
247
return $ this ->blockFactory ->create (
229
248
\Magento \ConfigurableProduct \Test \Block \Adminhtml \Product \AttributesGrid::class,
230
- ['element ' => $ this ->browser ->find (' #variation-steps-wizard_step1 .admin__data-grid-outer-wrap ' )]
249
+ ['element ' => $ this ->browser ->find ($ this -> attributesGridSelector )]
231
250
);
232
251
}
233
252
0 commit comments