function EditModeTest::assertAnnounceEditMode

Same name in other branches
  1. 9 core/modules/contextual/tests/src/FunctionalJavascript/EditModeTest.php \Drupal\Tests\contextual\FunctionalJavascript\EditModeTest::assertAnnounceEditMode()
  2. 10 core/modules/contextual/tests/src/FunctionalJavascript/EditModeTest.php \Drupal\Tests\contextual\FunctionalJavascript\EditModeTest::assertAnnounceEditMode()
  3. 11.x core/modules/contextual/tests/src/FunctionalJavascript/EditModeTest.php \Drupal\Tests\contextual\FunctionalJavascript\EditModeTest::assertAnnounceEditMode()

Asserts that the correct message was announced when entering edit mode.

1 call to EditModeTest::assertAnnounceEditMode()
EditModeTest::testEditModeEnableDisable in core/modules/contextual/tests/src/FunctionalJavascript/EditModeTest.php
Tests enabling and disabling edit mode.

File

core/modules/contextual/tests/src/FunctionalJavascript/EditModeTest.php, line 104

Class

EditModeTest
Tests edit mode.

Namespace

Drupal\Tests\contextual\FunctionalJavascript

Code

protected function assertAnnounceEditMode() {
    $web_assert = $this->assertSession();
    // Wait for contextual trigger button.
    $web_assert->waitForElementVisible('css', '.contextual trigger');
    $web_assert->elementContains('css', static::ANNOUNCE_SELECTOR, 'Tabbing is constrained to a set of');
    $web_assert->elementNotContains('css', static::ANNOUNCE_SELECTOR, 'Tabbing is no longer constrained by the Contextual module.');
}

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