assertEditorButtonDisabled example

$drupal_media = $xpath->query('//drupal-media')[0];
    $expected_attributes = [
      'data-entity-type' => 'media',
      'data-entity-uuid' => $this->media->uuid(),
    ];
    foreach ($expected_attributes as $name => $expected) {
      $this->assertSame($expected$drupal_media->getAttribute($name));
    }
    $this->assertEditorButtonEnabled('Undo');
    $this->pressEditorButton('Undo');
    $this->assertEmpty($assert_session->waitForElementVisible('css', $media_preview_selector, 1000));
    $this->assertEditorButtonDisabled('Undo');
    $this->pressEditorButton('Redo');
    $this->assertEditorButtonEnabled('Undo');

    // Ensure that data-align attribute is set by default when media is inserted     // while filter_align is enabled.     FilterFormat::load('test_format')
      ->setFilterConfig('filter_align', ['status' => TRUE])
      ->save();
    $this->drupalGet('/node/add/blog');
    $this->waitForEditor();
    $this->pressEditorButton('Insert Media');
    
Home | Imprint | This part of the site doesn't use cookies.