Skip to content
Snippets Groups Projects
Commit 1e1d9a9f authored by catch's avatar catch
Browse files

Issue #3191497 by bnjmnm, lauriii: core/jquery.ui.dialog is missing core/jquery assets

parent 738ac006
No related branches found
No related tags found
6 merge requests!7452Issue #1797438. HTML5 validation is preventing form submit and not fully...,!1012Issue #3226887: Hreflang on non-canonical content pages,!789Issue #3210310: Adjust Database API to remove deprecated Drupal 9 code in Drupal 10,!596Issue #3046532: deleting an entity reference field, used in a contextual view, makes the whole site unrecoverable,!496Issue #2463967: Use .user.ini file for PHP settings,!16Draft: Resolve #2081585 "History storage"
......@@ -625,6 +625,8 @@ jquery.ui.dialog:
assets/vendor/jquery.ui/themes/base/core.css: { weight: -11.8 }
theme:
assets/vendor/jquery.ui/themes/base/theme.css: { weight: -11.8 }
dependencies:
- core/jquery
deprecated: *jquery_ui_unused_deprecated
jquery.ui.draggable:
......
......@@ -23,7 +23,7 @@ public function testDeprecatedJqueryUi() {
'jquery.ui' => '1396fab9268ee2cce47df6ac3e4781c8',
'jquery.ui.autocomplete' => '153f2836f8f2da39767208b6e09cb5b4',
'jquery.ui.button' => 'ad23e5de0fa1de1f511d10ba2e10d2dd',
'jquery.ui.dialog' => 'dc72e5bd38a3d2697bcf3e7964852e4b',
'jquery.ui.dialog' => '2027aab39332607b62288c4d20c01f83',
'jquery.ui.draggable' => 'af0f2bdc8aa4ade1e3de8042f31a9312',
'jquery.ui.menu' => '7d0c4d57f43d2f881d2cd5e5b79effbb',
'jquery.ui.mouse' => '626bb203807fa2cdc62510412685df4a',
......@@ -37,6 +37,26 @@ public function testDeprecatedJqueryUi() {
foreach ($deprecated_jquery_ui_libraries as $library => $expected_hashed_library_definition) {
$this->expectDeprecation("The \"core/$library\" asset library is deprecated in drupal:9.2.0 and is removed from drupal:10.0.0. See https://www.drupal.org/node/3067969");
$library_definition = $library_discovery->getLibraryByName('core', $library);
$this->assertNotEmpty($library_definition['dependencies'], "$library must declare dependencies");
// Confirm that the libraries extending jQuery UI functionality depend on
// core/jquery.ui directly or via a dependency on core/jquery.ui.widget.
if ($library !== 'jquery.ui' && $library !== 'jquery.ui.dialog') {
$has_main_or_widget = (in_array('core/jquery.ui', $library_definition['dependencies']) || in_array('core/jquery.ui.widget', $library_definition['dependencies']));
$this->assertTrue($has_main_or_widget, "$library must depend on core/jquery.ui or core/jquery.ui.widget");
}
elseif ($library === 'jquery.ui.dialog') {
// jquery.ui.dialog must be evaluated differently due to it loading
// jQuery UI assets directly instead of depending on core/jquery.ui.
// This makes it necessary to depend on core/jquery as that dependency
// is not inherited from depending on core/jquery.ui.
//
// @todo Remove the tests specific to only jquery.ui.dialog as part of
// https://drupal.org/node/3192804
$dialog_depends_on_jquery_core = in_array('core/jquery', $library_definition['dependencies']) && $library === 'jquery.ui.dialog';
$this->assertTrue($dialog_depends_on_jquery_core, 'core/jquery.ui.dialog must depend on core/jquery');
}
$this->assertEquals($expected_hashed_library_definition, md5(serialize($library_definition)));
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment