You are here

protected function AutosaveFormTestBase::assertAutosaveFormLibraryLoaded in Autosave Form 8

Asserts that the autosave form library is loaded.

Parameters

bool $loaded:

2 calls to AutosaveFormTestBase::assertAutosaveFormLibraryLoaded()
ContentEntityAutosaveFormTestBase::doTestAutosaveFormExistingEntity in tests/src/FunctionalJavascript/ContentEntity/ContentEntityAutosaveFormTestBase.php
Tests the autosave support on entity forms.
ContentEntityAutosaveFormTestBase::doTestAutosaveFormNewEntity in tests/src/FunctionalJavascript/ContentEntity/ContentEntityAutosaveFormTestBase.php
Tests that the autosave form library is not loaded on new entity forms.

File

tests/src/FunctionalJavascript/AutosaveFormTestBase.php, line 175

Class

AutosaveFormTestBase
Basic functionality for autosave form tests.

Namespace

Drupal\Tests\autosave_form\FunctionalJavascript

Code

protected function assertAutosaveFormLibraryLoaded($loaded) {
  $dom_loaded = $this
    ->getSession()
    ->evaluateScript('Drupal.hasOwnProperty("autosaveForm")');
  $this
    ->assertEquals($loaded, $dom_loaded);
}