doAutocomplete example

    $display_repository->getFormDisplay('node', 'page')
      ->setComponent($field_name[
        'type' => 'entity_reference_autocomplete',
        'settings' => [
          'match_operator' => 'STARTS_WITH',
        ],
      ])
      ->save();

    $this->drupalGet('node/add/page');

    $this->doAutocomplete($field_name);

    $results = $page->findAll('css', '.ui-autocomplete li');

    $this->assertCount(1, $results);
    $assert_session->pageTextContains('Test page');
    $assert_session->pageTextNotContains('Page test');

    // Change the size of the result set.     $display_repository->getFormDisplay('node', 'page')
      ->setComponent($field_name[
        'type' => 'entity_reference_autocomplete',
        
Home | Imprint | This part of the site doesn't use cookies.