You are here

public function HandlerTest::testErrorMissingHelp in Drupal 10

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

Ensures that no missing help text is shown.

See also

\Drupal\views\EntityViewsData

File

core/modules/views_ui/tests/src/Functional/HandlerTest.php, line 278

Class

HandlerTest
Tests handler UI for views.

Namespace

Drupal\Tests\views_ui\Functional

Code

public function testErrorMissingHelp() {

  // Test that the error message is not shown for entity fields but an empty
  // description field is shown instead.
  $this
    ->drupalGet('admin/structure/views/nojs/add-handler/test_node_view/default/field');
  $this
    ->assertSession()
    ->pageTextNotContains('Error: missing help');
  $this
    ->assertSession()
    ->responseContains('<td class="description"></td>');

  // Test that no error message is shown for other fields.
  $this
    ->drupalGet('admin/structure/views/nojs/add-handler/test_view_empty/default/field');
  $this
    ->assertSession()
    ->pageTextNotContains('Error: missing help');
}