You are here

public function ViewEditTest::testRelationRepresentativeNode in Drupal 8

Same name and namespace in other branches
  1. 9 core/modules/views_ui/tests/src/Functional/ViewEditTest.php \Drupal\Tests\views_ui\Functional\ViewEditTest::testRelationRepresentativeNode()

Tests Representative Node for a Taxonomy Term.

File

core/modules/views_ui/tests/src/Functional/ViewEditTest.php, line 245

Class

ViewEditTest
Tests some general functionality of editing views, like deleting a view.

Namespace

Drupal\Tests\views_ui\Functional

Code

public function testRelationRepresentativeNode() {

  // Populate and submit the form.
  $edit["name[taxonomy_term_field_data.tid_representative]"] = TRUE;
  $this
    ->drupalPostForm('admin/structure/views/nojs/add-handler/test_groupwise_term_ui/default/relationship', $edit, 'Add and configure relationships');

  // Apply changes.
  $edit = [];
  $this
    ->drupalPostForm('admin/structure/views/nojs/handler/test_groupwise_term_ui/default/relationship/tid_representative', $edit, 'Apply');
}