function MediaTest::closeDialog

Closes the metadata dialog.

File

core/modules/ckeditor/tests/src/FunctionalJavascript/MediaTest.php, line 1454

Class

MediaTest
@coversDefaultClass \Drupal\ckeditor\Plugin\CKEditorPlugin\DrupalMedia @group ckeditor @group legacy

Namespace

Drupal\Tests\ckeditor\FunctionalJavascript

Code

protected function closeDialog() {
    $page = $this->getSession()
        ->getPage();
    $page->pressButton('Close');
    $result = $page->waitFor(10, function ($page) {
        $metadata_editor = $page->find('css', 'form.editor-media-dialog');
        return empty($metadata_editor);
    });
    $this->assertTrue($result);
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.