Skip to content
Snippets Groups Projects
Verified Commit c206e832 authored by Théodore Biadala's avatar Théodore Biadala
Browse files

Issue #3511071 by acbramley: NodeCreationtest::testAuthorAutocomplete has...

Issue #3511071 by acbramley: NodeCreationtest::testAuthorAutocomplete has incorrect selector for falsey check
parent 70cfbbe0
No related branches found
No related tags found
1 merge request!2964Issue #2865710 : Dependencies from only one instance of a widget are used in display modes
Pipeline #441654 passed with warnings
Pipeline: drupal

#441671

    Pipeline: drupal

    #441668

      Pipeline: drupal

      #441661

        ......@@ -261,27 +261,26 @@ public function testAuthoredDate(): void {
        */
        public function testAuthorAutocomplete(): void {
        $admin_user = $this->drupalCreateUser([
        'administer nodes',
        'create page content',
        ]);
        $this->drupalLogin($admin_user);
        $this->drupalGet('node/add/page');
        // Verify that no autocompletion exists without access user profiles.
        $this->assertSession()->elementNotExists('xpath', '//input[@id="edit-uid-0-value" and contains(@data-autocomplete-path, "user/autocomplete")]');
        $this->assertSession()->statusCodeEquals(200);
        // Verify that no autocompletion exists without administer nodes.
        $selector = '//input[@id="edit-uid-0-target-id" and contains(@data-autocomplete-path, "/entity_reference_autocomplete/user/default")]';
        $this->assertSession()->elementNotExists('xpath', $selector);
        $admin_user = $this->drupalCreateUser([
        'administer nodes',
        'create page content',
        'access user profiles',
        ]);
        $this->drupalLogin($admin_user);
        $this->drupalGet('node/add/page');
        // Ensure that the user does have access to the autocompletion.
        $this->assertSession()->elementsCount('xpath', '//input[@id="edit-uid-0-target-id" and contains(@data-autocomplete-path, "/entity_reference_autocomplete/user/default")]', 1);
        $this->assertSession()->elementsCount('xpath', $selector, 1);
        }
        /**
        ......
        0% Loading or .
        You are about to add 0 people to the discussion. Proceed with caution.
        Finish editing this message first!
        Please register or to comment