You are here

public function ThunderMediaTest::test8111 in Thunder 8.2

Test autoplay of videos.

File

tests/src/FunctionalJavascript/Update/ThunderMediaTest.php, line 156

Class

ThunderMediaTest
Test for update hook changes.

Namespace

Drupal\Tests\thunder\FunctionalJavascript\Update

Code

public function test8111() {
  $this
    ->drupalGet('node/6');
  $this
    ->assertSession()
    ->elementAttributeContains('css', '.video-embed-field-responsive-video iframe', 'src', 'autoplay=0');
  $this
    ->drupalLogout();
  $this
    ->drupalGet('node/6');
  $this
    ->assertSession()
    ->elementAttributeContains('css', '.video-embed-field-responsive-video iframe', 'src', 'autoplay=1');
  $this
    ->logWithRole('seo');
  $this
    ->drupalGet('node/6');
  $this
    ->assertSession()
    ->elementAttributeContains('css', '.video-embed-field-responsive-video iframe', 'src', 'autoplay=0');
}