You are here

protected function AutosaveFormTest::pressRestoreButton in Thunder 8.5

Same name and namespace in other branches
  1. 8.3 tests/src/FunctionalJavascript/Integration/AutosaveFormTest.php \Drupal\Tests\thunder\FunctionalJavascript\Integration\AutosaveFormTest::pressRestoreButton()
  2. 8.4 tests/src/FunctionalJavascript/Integration/AutosaveFormTest.php \Drupal\Tests\thunder\FunctionalJavascript\Integration\AutosaveFormTest::pressRestoreButton()
  3. 6.2.x tests/src/FunctionalJavascript/Integration/AutosaveFormTest.php \Drupal\Tests\thunder\FunctionalJavascript\Integration\AutosaveFormTest::pressRestoreButton()
  4. 6.0.x tests/src/FunctionalJavascript/Integration/AutosaveFormTest.php \Drupal\Tests\thunder\FunctionalJavascript\Integration\AutosaveFormTest::pressRestoreButton()
  5. 6.1.x tests/src/FunctionalJavascript/Integration/AutosaveFormTest.php \Drupal\Tests\thunder\FunctionalJavascript\Integration\AutosaveFormTest::pressRestoreButton()

Press the restore button.

1 call to AutosaveFormTest::pressRestoreButton()
AutosaveFormTest::testAutosaveInExistingEntity in tests/src/FunctionalJavascript/Integration/AutosaveFormTest.php
Tests the autosave functionality in an existing article.

File

tests/src/FunctionalJavascript/Integration/AutosaveFormTest.php, line 73

Class

AutosaveFormTest
Tests the autosave support for nodes in Thunder.

Namespace

Drupal\Tests\thunder\FunctionalJavascript\Integration

Code

protected function pressRestoreButton() {
  $page = $this
    ->getSession()
    ->getPage();

  // Press restore button.
  $this
    ->assertSession()
    ->waitForText('A version of this page you were editing at');
  $restore_button = $page
    ->find('css', '.autosave-form-resume-button');
  $restore_button
    ->press();
}