Same name and namespace in other branches
  1. 8.x-1.x tests/src/FunctionalJavascript/ColorboxJavascriptTest.php \Drupal\Tests\colorbox\FunctionalJavascript\ColorboxJavascriptTest::testColorboxLaunches() 1 comment

Test the colorbox launches when a gallery is clicked.

File

tests/src/FunctionalJavascript/ColorboxJavascriptTest.php, line 53

Class

ColorboxJavascriptTest
Test the colorbox JavaScript.

Namespace

Drupal\Tests\colorbox\FunctionalJavascript

Code

public function testColorboxLaunches() {
    $this->drupalGet('node/' . $this->node
        ->id());
    $this->getSession()
        ->getPage()
        ->find('css', 'img')
        ->click();
    $this->getSession()
        ->wait(static::COLORBOX_WAIT_TIMEOUT);
    $this->assertSession()
        ->elementContains('css', '#colorbox', 'test.png');
}