File tree Expand file tree Collapse file tree 1 file changed +13
-6
lines changed
dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Product Expand file tree Collapse file tree 1 file changed +13
-6
lines changed Original file line number Diff line number Diff line change @@ -567,12 +567,19 @@ public function clickBaseImage()
567
567
*/
568
568
public function closeFullImage ()
569
569
{
570
- $ element = $ this ->browser ->find ($ this ->fullImageClose , Locator::SELECTOR_CSS );
571
- if (!$ element ->isVisible ()) {
572
- $ element ->hover ();
573
- $ this ->waitForElementVisible ($ this ->fullImageClose );
574
- }
575
- $ element ->click ();
570
+ $ this ->_rootElement ->waitUntil (
571
+ function () {
572
+ $ this ->browser ->find ($ this ->fullImage )->hover ();
573
+
574
+ if ($ this ->browser ->find ($ this ->fullImageClose )->isVisible ()) {
575
+ $ this ->browser ->find ($ this ->fullImageClose )->click ();
576
+
577
+ return true ;
578
+ }
579
+
580
+ return null ;
581
+ }
582
+ );
576
583
}
577
584
578
585
/**
You can’t perform that action at this time.
0 commit comments