You are here

public function EntityContext::visitRevision in Lightning Core 8.3

Same name and namespace in other branches
  1. 8.5 tests/contexts/EntityContext.behat.inc \Acquia\LightningExtension\Context\EntityContext::visitRevision()
  2. 8 tests/contexts/EntityContext.behat.inc \Acquia\LightningExtension\Context\EntityContext::visitRevision()
  3. 8.2 tests/contexts/EntityContext.behat.inc \Acquia\LightningExtension\Context\EntityContext::visitRevision()
  4. 8.4 tests/contexts/EntityContext.behat.inc \Acquia\LightningExtension\Context\EntityContext::visitRevision()

Visits a specific revision of a node.

@When /^I visit the (\d+)(?:st|nd|rd|th) revision$/

Parameters

int $n: The one-based index of the revision.

File

tests/contexts/EntityContext.behat.inc, line 272

Class

EntityContext
Contains miscellaneous step definitions for working with Drupal entities.

Namespace

Acquia\LightningExtension\Context

Code

public function visitRevision($n) {
  $this
    ->assertSession()
    ->elementExists('named', [
    'link',
    'Revisions',
  ])
    ->click();
  $this
    ->getContext(ElementContext::class)
    ->click("main table tr:nth-child({$n}) td:first-child a");
}