You are here

public function ShareThisBlockAdminTest::testSaveForm in Sharethis block 8

Tests that the form can be saved and changed values show.

Throws

ExpectationException

File

tests/src/Functional/ShareThisBlockAdminTest.php, line 71

Class

ShareThisBlockAdminTest
Class SettingsPageTest

Namespace

Drupal\Tests\sharethis_block\Functional

Code

public function testSaveForm() {
  $this
    ->drupalGet('/admin/config/user-interface/sharethis');
  $this
    ->assertSession()
    ->fieldValueEquals('property_id', '');
  $this
    ->getSession()
    ->getPage()
    ->fillField('property_id', '5ece0df09d73fe001243be34');
  $this
    ->getSession()
    ->getPage()
    ->selectFieldOption('inline', '1');
  $this
    ->getSession()
    ->getPage()
    ->pressButton('Save configuration');
  $this
    ->drupalGet('/admin/config/user-interface/sharethis');
  $this
    ->assertSession()
    ->fieldValueEquals('inline', '1');
  $this
    ->assertSession()
    ->fieldValueEquals('property_id', '5ece0df09d73fe001243be34');
}