function InlineBlockTestBase::waitForNoElement

Waits for an element to be removed from the page.

Parameters

string $selector: CSS selector.

int $timeout: (optional) Timeout in milliseconds, defaults to 10000.

Deprecated

in drupal:8.8.0 and is removed from drupal:9.0.0. Use Drupal\FunctionalJavascriptTests\JSWebAssert::assertNoElementAfterWait()

File

core/modules/layout_builder/tests/src/FunctionalJavascript/InlineBlockTestBase.php, line 186

Class

InlineBlockTestBase
Base class for testing inline blocks.

Namespace

Drupal\Tests\layout_builder\FunctionalJavascript

Code

protected function waitForNoElement($selector, $timeout = 10000) {
    @trigger_error('::waitForNoElement is deprecated in Drupal 8.8.0 and will be removed before Drupal 9.0.0. Use \\Drupal\\FunctionalJavascriptTests\\JSWebAssert::assertNoElementAfterWait() instead.', E_USER_DEPRECATED);
    $condition = "(typeof jQuery !== 'undefined' && jQuery('{$selector}').length === 0)";
    $this->assertJsCondition($condition, $timeout);
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.