/**
  * {@inheritdoc}
  */
 public function assertPageContainsText($text)
 {
     $this->spin(function () use($text) {
         parent::assertPageContainsText($text);
         return true;
     }, "Spining for asserting page contains text {$text}");
 }
 /**
  * Override method to wait for Ajax requests to finish before continuing
  *
  * @param $text
  */
 public function assertPageContainsText($text)
 {
     $this->getSession()->wait(10000, '(typeof(jQuery)=="undefined" || (0 === jQuery.active && 0 === jQuery(\':animated\').length))');
     parent::assertPageContainsText($text);
 }