createVocabulary(); $term = $this->createTerm($vocabulary); $user = $this->drupalCreateUser([ 'administer taxonomy', 'access contextual links', ]); $this->drupalLogin($user); $this->drupalGet('taxonomy/term/' . $term->id()); $this->assertSession()->elementAttributeContains('css', 'div[data-contextual-id]', 'data-contextual-id', 'taxonomy_term:taxonomy_term=' . $term->id() . ':'); } }