You are here

protected function SmartReadMoreLinkTest::configureField in Smart read more link 8

1 call to SmartReadMoreLinkTest::configureField()
SmartReadMoreLinkTest::setUp in tests/src/Functional/SmartReadMoreLinkTest.php

File

tests/src/Functional/SmartReadMoreLinkTest.php, line 120

Class

SmartReadMoreLinkTest
Functional tests of smart_read_more_link module.

Namespace

Drupal\Tests\smart_read_more_link\Functional

Code

protected function configureField() {
  $account = $this
    ->drupalCreateUser([
    'administer nodes',
    'administer content types',
    'administer node fields',
    'administer node display',
    'bypass node access',
    'use text format full_html',
  ]);
  $this
    ->drupalLogin($account);
  $this
    ->drupalGet('/admin/structure/types/manage/article/display/teaser');
  $this
    ->getSession()
    ->getPage()
    ->selectFieldOption('edit-fields-links-region', 'hidden');
  $this
    ->getSession()
    ->getPage()
    ->selectFieldOption('edit-fields-body-type', 'smart_read_more_link');
  $this
    ->getSession()
    ->getPage()
    ->pressButton('Save');
}