You are here

protected function NodeVoteTrait::unVoteFivestarById in Rate 8.2

Same name and namespace in other branches
  1. 8 tests/src/Traits/NodeVoteTrait.php \Drupal\Tests\rate\Traits\NodeVoteTrait::unVoteFivestarById()

Un-vote "Fivestar" by node id.

Parameters

int $nid: The node id.

File

tests/src/Traits/NodeVoteTrait.php, line 33

Class

NodeVoteTrait
Provides methods to voting on nodes.

Namespace

Drupal\Tests\rate\Traits

Code

protected function unVoteFivestarById($nid) {
  $this
    ->assertSession()
    ->elementExists('css', '.rate-fivestar-1');
  $node_selector = '[data-drupal-selector="rate-node-' . $nid . '"]';
  $this
    ->click($node_selector . ' .rate-undo');
}