public function TestSubContext::waitForLivePreview in Panopoly 7
Same name and namespace in other branches
- 8.2 modules/panopoly/panopoly_test/behat/steps/panopoly_test.behat.inc \TestSubContext::waitForLivePreview()
Wait until the live preview to finish.
@When I wait for live preview to finish
File
- modules/
panopoly/ panopoly_test/ behat/ steps/ panopoly_test.behat.inc, line 686 - Provide Behat step-definitions for generic Panopoly tests.
Class
Code
public function waitForLivePreview() {
// Make sure the live preview has triggered by bluring the current focus.
$this
->getSession()
->executeScript("document.activeElement.blur()");
$this
->getSession()
->wait(5000, 'typeof jQuery !== "undefined" && jQuery.active === 0 && jQuery("#panopoly-form-widget-preview").length > 0 && !jQuery("#panopoly-form-widget-preview").hasClass("panopoly-magic-loading")');
}