diff --git a/core/modules/entity_reference/lib/Drupal/entity_reference/Tests/EntityReferenceAutoCreateTest.php b/core/modules/entity_reference/lib/Drupal/entity_reference/Tests/EntityReferenceAutoCreateTest.php index 09fec90..f07a6ee 100644 --- a/core/modules/entity_reference/lib/Drupal/entity_reference/Tests/EntityReferenceAutoCreateTest.php +++ b/core/modules/entity_reference/lib/Drupal/entity_reference/Tests/EntityReferenceAutoCreateTest.php @@ -17,7 +17,7 @@ class EntityReferenceAutoCreateTest extends WebTestBase { public static function getInfo() { return array( - 'name' => 'Entity Reference auto-create', + 'name' => 'Entity Reference auto-create and autocomplete UI', 'description' => 'Tests creating new entity (e.g. taxonomy-term) from an autocomplete widget.', 'group' => 'Entity Reference', ); @@ -76,12 +76,16 @@ function setUp() { } /** - * Assert creation on a new entity. + * Tests that the autocomplete input element appears and the creation of a new + * entity. */ public function testAutoCreate() { $user1 = $this->drupalCreateUser(array('access content', "create $this->referencing_type content")); $this->drupalLogin($user1); + $this->drupalGet('node/add/' . $this->referencing_type); + $this->assertFieldByXPath('//input[@id="edit-test-field-0-target-id" and contains(@class, "form-autocomplete")]', NULL, 'The autocomplete input element appears.'); + $new_title = $this->randomName(); // Assert referenced node does not exist.