You are here

public function ViewEditTest::testRelationRepresentativeNode in Drupal 9

Same name and namespace in other branches
  1. 8 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 257

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
    ->drupalGet('admin/structure/views/nojs/add-handler/test_groupwise_term_ui/default/relationship');
  $this
    ->submitForm($edit, 'Add and configure relationships');

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