Skip to content

Commit 4c24a51

Browse files
committed
MC-17868: Break jQuery UI into widgets and make a prototype
- Fix integration test; - Add jquery/ui for jasmine lib mage; - Remove static test for jquery/ui in php files;
1 parent 2e67234 commit 4c24a51

File tree

6 files changed

+6
-18
lines changed

6 files changed

+6
-18
lines changed

dev/tests/integration/testsuite/Magento/Framework/View/_files/static/expected/test.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dev/tests/integration/testsuite/Magento/Framework/View/_files/static/theme/web/js/test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
define([
66
"jquery",
77
"matchMedia",
8-
'jquery-ui-modules/menu',
8+
"jquery-ui-modules/menu",
99
"jquery/jquery.mobile.custom",
1010
"mage/translate"
1111
], function ($, mediaCheck) {

dev/tests/js/jasmine/tests/lib/mage/calendar.test.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
/* eslint-disable max-nested-callbacks */
77
define([
88
'jquery',
9+
'jquery/ui',
910
'mage/calendar'
1011
], function ($) {
1112
'use strict';

dev/tests/js/jasmine/tests/lib/mage/collapsible.test.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77

88
define([
99
'jquery',
10+
'jquery/ui',
1011
'mage/collapsible'
1112
], function ($) {
1213
'use strict';

dev/tests/js/jasmine/tests/lib/mage/tabs.test.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,10 @@
66
/* eslint-disable max-nested-callbacks */
77
define([
88
'jquery',
9+
'jquery/ui',
910
'mage/tabs',
1011
'text!tests/assets/lib/web/mage/tabs.html'
11-
], function ($, tabs, tabsTmpl) {
12+
], function ($, ui, tabs, tabsTmpl) {
1213
'use strict';
1314

1415
describe('mage/tabs', function () {

dev/tests/static/testsuite/Magento/Test/Legacy/ObsoleteCodeTest.php

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,6 @@ function ($file) {
127127
$this->_testObsoleteActions($content);
128128
$this->_testObsoleteConstants($content);
129129
$this->_testObsoletePropertySkipCalculate($content);
130-
$this->_testJqueryUiLibraryIsNotUsedInPhp($content);
131130
},
132131
$changedFiles
133132
);
@@ -967,18 +966,4 @@ private function _testJqueryUiLibraryIsNotUsedInJs($fileContent)
967966
$this->_suggestReplacement(sprintf("Dependency '%s' is redundant.", 'jquery/ui'), 'Use separate jquery ui widget instead of all library.')
968967
);
969968
}
970-
971-
/**
972-
* Assert that jquery/ui library is not used in PHP content.
973-
*
974-
* @param string $fileContent
975-
*/
976-
private function _testJqueryUiLibraryIsNotUsedInPhp($fileContent)
977-
{
978-
$this->_assertNotRegExp(
979-
'/(["\'])jquery\/ui\1/',
980-
$fileContent,
981-
$this->_suggestReplacement(sprintf("Dependency '%s' is redundant.", 'jquery/ui'), 'Use separate jquery ui widget instead of all library.')
982-
);
983-
}
984969
}

0 commit comments

Comments
 (0)