WebDriverWebAssert.php in Lightning Media 8.4
File
tests/src/FunctionalJavascript/WebDriverWebAssert.php
View source
<?php
namespace Drupal\Tests\lightning_media\FunctionalJavascript;
use Drupal\FunctionalJavascriptTests\WebDriverWebAssert as BaseWebDriverWebAssert;
use PHPUnit\Framework\Assert;
class WebDriverWebAssert extends BaseWebDriverWebAssert {
public function waitForButton($locator, $timeout = 10000) {
$button = parent::waitForButton($locator, $timeout);
Assert::assertNotEmpty($button);
return $button;
}
public function waitForElement($selector, $locator, $timeout = 10000) {
$element = parent::waitForElement($selector, $locator, $timeout);
Assert::assertNotEmpty($element);
return $element;
}
public function waitForField($locator, $timeout = 10000) {
$field = parent::waitForField($locator, $timeout);
Assert::assertNotEmpty($field);
return $field;
}
public function waitForLink($locator, $timeout = 10000) {
$link = parent::waitForLink($locator, $timeout);
Assert::assertNotEmpty($link);
return $link;
}
public function waitForText($text, $timeout = 10000) {
$result = parent::waitForText($text, $timeout);
Assert::assertNotEmpty($result);
}
}