public function BlazyBlazyJavaScriptTest::testFormatterDisplay in Blazy 8.2
Test the Blazy element from loading to loaded states.
File
- tests/
src/ FunctionalJavascript/ BlazyBlazyJavaScriptTest.php, line 15
Class
- BlazyBlazyJavaScriptTest
- Tests the Blazy bLazy JavaScript using PhantomJS, or Chromedriver.
Namespace
Drupal\Tests\blazy\FunctionalJavascriptCode
public function testFormatterDisplay() {
$data['settings']['blazy'] = TRUE;
$data['settings']['ratio'] = '';
$data['settings']['image_style'] = 'thumbnail';
$this
->setUpContentTypeTest($this->bundle);
$this
->setUpFormatterDisplay($this->bundle, $data);
$this
->setUpContentWithItems($this->bundle);
$this
->drupalGet('node/' . $this->entity
->id());
// Ensures Blazy is not loaded on page load.
// @todo with Native lazyload, b-loaded is enforced on page load. And
// since the testing browser Chrome support it, it is irrelevant.
// @todo $this->assertSession()->elementNotExists('css', '.b-loaded');
$this
->doTestFormatterDisplay();
}