You are here

public function LinkTypeConfirmFormTest::testCreateConfirmFlag in Flag 8.4

Same name in this branch
  1. 8.4 tests/src/Functional/LinkTypeConfirmFormTest.php \Drupal\Tests\flag\Functional\LinkTypeConfirmFormTest::testCreateConfirmFlag()
  2. 8.4 tests/src/FunctionalJavascript/LinkTypeConfirmFormTest.php \Drupal\Tests\flag\FunctionalJavascript\LinkTypeConfirmFormTest::testCreateConfirmFlag()

Test the confirm form link type.

File

tests/src/FunctionalJavascript/LinkTypeConfirmFormTest.php, line 15

Class

LinkTypeConfirmFormTest
Tests the confirm form link type.

Namespace

Drupal\Tests\flag\FunctionalJavascript

Code

public function testCreateConfirmFlag() {
  $this
    ->drupalLogin($this->adminUser);
  $assert_session = $this
    ->assertSession();
  $page = $this
    ->getSession()
    ->getPage();
  $this
    ->drupalGet('/admin/structure/flags/add');
  $page
    ->pressButton('Continue');
  $page
    ->selectFieldOption('link_type', 'confirm');
  $assert_session
    ->waitForText('Flag confirmation message');
  $assert_session
    ->pageTextContains('Unflag confirmation message');
}