public function EmbedDialogTest::testNestedMarkup in Video Embed Field 8
Same name and namespace in other branches
- 8.2 modules/video_embed_wysiwyg/tests/src/FunctionalJavascript/EmbedDialogTest.php \Drupal\Tests\video_embed_wysiwyg\FunctionalJavascript\EmbedDialogTest::testNestedMarkup()
Test the WYSIWYG integration works with nested markup.
File
- modules/
video_embed_wysiwyg/ tests/ src/ FunctionalJavascript/ EmbedDialogTest.php, line 109
Class
- EmbedDialogTest
- Test the dialog form.
Namespace
Drupal\Tests\video_embed_wysiwyg\FunctionalJavascriptCode
public function testNestedMarkup() {
$nested_content = '<div class="nested-content">
<p>{"preview_thumbnail":"/thumb.jpg","video_url":"https://www.youtube.com/watch?v=iaf3Sl2r3jE","settings":{"responsive":1,"width":"854","height":"480","autoplay":1},"settings_summary":["Embedded Video (Responsive, autoplaying)."]}</p>
</div>';
$node = $this
->createNode([
'type' => 'page',
'body' => [
'value' => $nested_content,
],
]);
$this
->drupalGet('node/' . $node
->id() . '/edit');
$this
->find('.cke_button__source_label')
->click();
$this
->assertEquals($nested_content, trim($this
->getSession()
->getPage()
->find('css', '.cke_source')
->getValue()));
}