Issue #3291018 by Spokje, Wim Leers: Move \Drupal\Tests\ckeditor5\Functional\CKEditor5QuickEditLibraryTest to the quickedit namespace/directory
							parent
							
								
									d77a68d585
								
							
						
					
					
						commit
						1c5c378e02
					
				| 
						 | 
				
			
			@ -37,12 +37,6 @@ drupal.ckeditor5.stylesheets:
 | 
			
		|||
  version: VERSION
 | 
			
		||||
  css: []
 | 
			
		||||
 | 
			
		||||
drupal.ckeditor5.quickedit-temporary-work-around:
 | 
			
		||||
  deprecated: "Temporary work-around until https://www.drupal.org/project/drupal/issues/3196689 lands."
 | 
			
		||||
  css:
 | 
			
		||||
    theme:
 | 
			
		||||
      css/quickedit-override.css: {}
 | 
			
		||||
 | 
			
		||||
drupal.ckeditor5.codeBlock:
 | 
			
		||||
  dependencies:
 | 
			
		||||
    - core/ckeditor5.codeBlock
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -434,10 +434,6 @@ function ckeditor5_library_info_alter(&$libraries, $extension) {
 | 
			
		|||
        'theme' => array_fill_keys(array_values($css), []),
 | 
			
		||||
      ],
 | 
			
		||||
    ];
 | 
			
		||||
 | 
			
		||||
    if ($moduleHandler->moduleExists('quickedit')) {
 | 
			
		||||
      $libraries['drupal.ckeditor5']['dependencies'][] = 'ckeditor5/drupal.ckeditor5.quickedit-temporary-work-around';
 | 
			
		||||
    }
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  if ($extension === 'core') {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -48,6 +48,12 @@ quickedit.inPlaceEditor.form:
 | 
			
		|||
  dependencies:
 | 
			
		||||
    - quickedit/quickedit
 | 
			
		||||
 | 
			
		||||
quickedit.ckeditor5-temporary-work-around:
 | 
			
		||||
  # "Temporary work-around until https://www.drupal.org/project/drupal/issues/3196689 lands."
 | 
			
		||||
  css:
 | 
			
		||||
    theme:
 | 
			
		||||
      css/editors/formattedText/ckeditor5.workaround.css: { }
 | 
			
		||||
 | 
			
		||||
quickedit.inPlaceEditor.formattedText:
 | 
			
		||||
  version: VERSION
 | 
			
		||||
  css:
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -101,6 +101,11 @@ function quickedit_library_info_alter(&$libraries, $extension) {
 | 
			
		|||
 | 
			
		||||
    $alter_library($libraries['quickedit'], $theme);
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  $moduleHandler = \Drupal::moduleHandler();
 | 
			
		||||
  if ($moduleHandler->moduleExists('ckeditor5')) {
 | 
			
		||||
    $libraries['drupal.ckeditor5']['dependencies'][] = 'quickedit/quickedit.ckeditor5-temporary-work-around';
 | 
			
		||||
  }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1,6 +1,6 @@
 | 
			
		|||
<?php
 | 
			
		||||
 | 
			
		||||
namespace Drupal\Tests\ckeditor5\Functional;
 | 
			
		||||
namespace Drupal\Tests\quickedit\Functional\CKEditor5;
 | 
			
		||||
 | 
			
		||||
use Drupal\ckeditor5\Plugin\Editor\CKEditor5;
 | 
			
		||||
use Drupal\editor\Entity\Editor;
 | 
			
		||||
| 
						 | 
				
			
			@ -14,6 +14,7 @@ use Symfony\Component\Validator\ConstraintViolation;
 | 
			
		|||
 * Tests that a Quick Edit specific library loads when Quick Edit is enabled.
 | 
			
		||||
 *
 | 
			
		||||
 * @group ckeditor5
 | 
			
		||||
 * @group quickedit
 | 
			
		||||
 * @group legacy
 | 
			
		||||
 */
 | 
			
		||||
class CKEditor5QuickEditLibraryTest extends BrowserTestBase {
 | 
			
		||||
| 
						 | 
				
			
			@ -85,11 +86,8 @@ class CKEditor5QuickEditLibraryTest extends BrowserTestBase {
 | 
			
		|||
   */
 | 
			
		||||
  public function testQuickeditTemporaryWorkaround() {
 | 
			
		||||
    $assert_session = $this->assertSession();
 | 
			
		||||
 | 
			
		||||
    $this->expectDeprecation('Temporary work-around until https://www.drupal.org/project/drupal/issues/3196689 lands.');
 | 
			
		||||
 | 
			
		||||
    $this->drupalGet('node/add/article');
 | 
			
		||||
    $assert_session->responseContains('css/quickedit-override.css');
 | 
			
		||||
    $assert_session->responseContains('css/editors/formattedText/ckeditor5.workaround.css');
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			@ -0,0 +1,9 @@
 | 
			
		|||
.quickedit-editable,
 | 
			
		||||
.quickedit-editing.ck.ck-editor__editable_inline {
 | 
			
		||||
  top: inherit !important;
 | 
			
		||||
  left: inherit !important;
 | 
			
		||||
  margin-bottom: inherit !important;
 | 
			
		||||
}
 | 
			
		||||
.quickedit-editing.ck.ck-editor__editable_inline > :first-child {
 | 
			
		||||
  margin-top: inherit;
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			@ -199,6 +199,11 @@ libraries-override:
 | 
			
		|||
        css/editors/image.css: css/quickedit/editors/image.css
 | 
			
		||||
      theme:
 | 
			
		||||
        css/editors/image.theme.css: css/quickedit/editors/image.theme.css
 | 
			
		||||
  quickedit/quickedit.ckeditor5-temporary-work-around:
 | 
			
		||||
    # "Temporary work-around until https://www.drupal.org/project/drupal/issues/3196689 lands."
 | 
			
		||||
    css:
 | 
			
		||||
      theme:
 | 
			
		||||
        css/editors/formattedText/ckeditor5.workaround.css: css/quickedit/editors/formattedText/ckeditor5.workaround.css
 | 
			
		||||
 | 
			
		||||
  settings_tray/drupal.settings_tray:
 | 
			
		||||
    css:
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -0,0 +1,9 @@
 | 
			
		|||
.quickedit-editable,
 | 
			
		||||
.quickedit-editing.ck.ck-editor__editable_inline {
 | 
			
		||||
  top: inherit !important;
 | 
			
		||||
  left: inherit !important;
 | 
			
		||||
  margin-bottom: inherit !important;
 | 
			
		||||
}
 | 
			
		||||
.quickedit-editing.ck.ck-editor__editable_inline > :first-child {
 | 
			
		||||
  margin-top: inherit;
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			@ -219,6 +219,11 @@ libraries-override:
 | 
			
		|||
        css/editors/image.css: css/quickedit/editors/image.css
 | 
			
		||||
      theme:
 | 
			
		||||
        css/editors/image.theme.css: css/quickedit/editors/image.theme.css
 | 
			
		||||
  quickedit/quickedit.ckeditor5-temporary-work-around:
 | 
			
		||||
    # "Temporary work-around until https://www.drupal.org/project/drupal/issues/3196689 lands."
 | 
			
		||||
    css:
 | 
			
		||||
      theme:
 | 
			
		||||
        css/editors/formattedText/ckeditor5.workaround.css: css/quickedit/editors/formattedText/ckeditor5.workaround.css
 | 
			
		||||
 | 
			
		||||
  settings_tray/drupal.settings_tray:
 | 
			
		||||
    css:
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue