You are here

protected function EntityEmbedTestBase::showHiddenFields in Entity Embed 8

Show visually hidden fields.

1 call to EntityEmbedTestBase::showHiddenFields()
ConfigurationUiTest::testValidationWhenAdding in tests/src/FunctionalJavascript/ConfigurationUiTest.php
Test integration with Filter and Text Editor form validation.

File

tests/src/FunctionalJavascript/EntityEmbedTestBase.php, line 95

Class

EntityEmbedTestBase
Base class for all entity_embed tests.

Namespace

Drupal\Tests\entity_embed\FunctionalJavascript

Code

protected function showHiddenFields() {
  $script = <<<JS
      var hidden_fields = document.querySelectorAll(".visually-hidden");

      [].forEach.call(hidden_fields, function(el) {
        el.classList.remove("visually-hidden");
      });
JS;
  $this
    ->getSession()
    ->executeScript($script);
}