Skip to content

Commit 808afad

Browse files
committed
MAGETWO-34293: Html minification works incorrectly in Layered Navigation
1 parent 7df5e3d commit 808afad

File tree

1 file changed

+24
-0
lines changed
  • dev/tests/functional/tests/app/Magento/Cms/Test/Block

1 file changed

+24
-0
lines changed

dev/tests/functional/tests/app/Magento/Cms/Test/Block/Page.php

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,13 @@ class Page extends Block
5050
'CMS Static Block' => './/*/div[contains(@class,"widget static block") and contains(.,"%s")]',
5151
];
5252

53+
/**
54+
* Selector for uninitialized page.
55+
*
56+
* @var string
57+
*/
58+
protected $uninitialized = '//body[(@data-mage-init)]';
59+
5360
/**
5461
* Get page content text.
5562
*
@@ -107,4 +114,21 @@ public function isWidgetVisible($widgetType, $widgetText)
107114
throw new \Exception('Determine how to find the widget on the page.');
108115
}
109116
}
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+
}
110134
}

0 commit comments

Comments
 (0)