You are here

public function ExtraFieldDisplayUITest::testAllNodeTypesPlugin in Extra Field 8.2

Same name and namespace in other branches
  1. 8 tests/src/Functional/ExtraFieldDisplayUITest.php \Drupal\Tests\extra_field\Functional\ExtraFieldDisplayUITest::testAllNodeTypesPlugin()

Test if AllNodeTypes plugin is displayed on entity display pages.

File

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

Class

ExtraFieldDisplayUITest
Tests the extra field Display on entity UI pages.

Namespace

Drupal\Tests\extra_field\Functional

Code

public function testAllNodeTypesPlugin() {

  // Check presence 'first_node_type' display page.
  $this
    ->drupalGet($this->manageDisplayUrl['first_node_type']);
  $this
    ->assertSession()
    ->pageTextContains('Extra field for all node types');

  // Check enabled/disabled and weight.
  $this
    ->assertSession()
    ->fieldValueEquals('fields[extra_field_all_node_types_test][region]', 'content');
  $this
    ->assertSession()
    ->fieldValueEquals('fields[extra_field_all_node_types_test][weight]', '7');

  // Check presence 'another_node_type' display page.
  $this
    ->drupalGet($this->manageDisplayUrl['another_node_type']);
  $this
    ->assertSession()
    ->pageTextContains('Extra field for all node types');
}