You are here

protected function CKEditorIntegrationTest::closeDialog in Drupal 8

Same name and namespace in other branches
  1. 9 core/modules/media/tests/src/FunctionalJavascript/CKEditorIntegrationTest.php \Drupal\Tests\media\FunctionalJavascript\CKEditorIntegrationTest::closeDialog()

Closes the metadata dialog.

File

core/modules/media/tests/src/FunctionalJavascript/CKEditorIntegrationTest.php, line 1405

Class

CKEditorIntegrationTest
@coversDefaultClass \Drupal\media\Plugin\CKEditorPlugin\DrupalMedia @group media

Namespace

Drupal\Tests\media\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);
}