You are here

protected function EditModeTest::assertAnnounceEditMode in Drupal 10

Same name and namespace in other branches
  1. 8 core/modules/contextual/tests/src/FunctionalJavascript/EditModeTest.php \Drupal\Tests\contextual\FunctionalJavascript\EditModeTest::assertAnnounceEditMode()
  2. 9 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.

@internal

File

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

Class

EditModeTest
Tests edit mode.

Namespace

Drupal\Tests\contextual\FunctionalJavascript

Code

protected function assertAnnounceEditMode() : void {
  $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.');
}