You are here

protected function AutosaveFormTestBase::pressAutosaveRestoreButton in Autosave Form 8

Presses the autosave restore button.

1 call to AutosaveFormTestBase::pressAutosaveRestoreButton()
AutosaveFormTestBase::reloadPageAndRestore in tests/src/FunctionalJavascript/AutosaveFormTestBase.php
Loads the page and submits the autosave restore.

File

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

Class

AutosaveFormTestBase
Basic functionality for autosave form tests.

Namespace

Drupal\Tests\autosave_form\FunctionalJavascript

Code

protected function pressAutosaveRestoreButton() {
  $page = $this
    ->getSession()
    ->getPage();
  $restore_button = $page
    ->find('css', '.autosave-form-resume-button');
  $this
    ->assertNotEmpty($restore_button);
  $restore_button
    ->press();
}