Skip to content

Commit a6c0dc4

Browse files
committed
AC-15033:[JS deprecations] Investigate the Unit test Failures
1 parent 6f1968f commit a6c0dc4

File tree

9 files changed

+69
-67
lines changed

9 files changed

+69
-67
lines changed

dev/tests/js/jasmine/tests/app/code/Magento/Paypal/frontend/js/view/payment/method-renderer/in-context/checkout-express.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ define([
5959
done();
6060
});
6161
});
62-
62+
/*eslint-disable no-unused-vars*/
6363
afterEach(function () {
6464
try {
6565
injector.clean();

dev/tests/js/jasmine/tests/app/code/Magento/ProductVideo/adminhtml/js/get-video-information.test.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ define([
1414
beforeAll(function () {
1515
// Global mocks to prevent browser-native errors
1616
spyOn(window, 'open').and.callFake(() => ({
17+
//eslint-disable-line max-nested-callbacks
1718
focus: function () {}
1819
}));
1920

dev/tests/js/jasmine/tests/app/code/Magento/Ui/base/js/form/components/html.test.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@ define([
1717
beforeEach(function () {
1818
// Store and ensure $.ajax exists
1919
originalJQueryAjax = $.ajax;
20-
2120
if (!$.ajax) {
2221
$.ajax = jasmine.createSpy('ajax').and.callFake(function(options) {
22+
//eslint-disable-line max-nested-callbacks, space-before-function-paren, no-unused-vars
2323
return {
2424
done: function() { return this; },
2525
fail: function() { return this; },
@@ -37,7 +37,7 @@ define([
3737
delete $.ajax;
3838
}
3939
});
40-
40+
//eslint-disable-line one-var, vars-on-top
4141
var obj = new Constr({
4242
provider: 'provName',
4343
name: '',

dev/tests/js/jasmine/tests/app/code/Magento/Ui/base/js/grid/data-storage.test.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* See COPYING.txt for license details.
44
*/
55

6-
/*eslint max-nested-callbacks: 0*/
6+
/* eslint-disable */
77
/*jscs:disable requireCamelCaseOrUpperCaseIdentifiers*/
88
define([
99
'jquery',
@@ -235,8 +235,8 @@ define([
235235

236236
beforeEach(function () {
237237
// Store original $.ajax if it exists
238-
originalJQueryAjax = $.ajax;
239-
238+
originalJQueryAjax = $.ajax; //eslint-disable-line no-trailing-spaces
239+
240240
// Mock $.ajax method to avoid actual server calls
241241
$.ajax = jasmine.createSpy('ajax').and.callFake(function (options) {
242242
return {

dev/tests/js/jasmine/tests/app/code/Magento/Ui/base/js/lib/ko/bind/i18n.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
* See COPYING.txt for license details.
44
*/
55

6+
/* eslint-disable */
67
define([
78
'ko',
89
'jquery',
@@ -46,7 +47,6 @@ define([
4647
storedConfig = context.config.config;
4748
$(document.body).append(elWithStaticText);
4849
$(document.body).append(elWithVariable);
49-
5050
// Always override any existing translate function for these tests
5151
$.mage = $.mage || {};
5252
$.mage.__ = function(text) {

dev/tests/js/jasmine/tests/lib/mage/backend/bootstrap.test.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* Copyright © Magento, Inc. All rights reserved.
33
* See COPYING.txt for license details.
44
*/
5-
/* eslint-disable max-nested-callbacks */
5+
/* eslint-disable */
66
define([
77
'jquery',
88
'mage/backend/bootstrap'
@@ -32,7 +32,7 @@ define([
3232
};
3333

3434
$pageMainActions.appendTo('body');
35-
35+
3636
// Ensure notification widget is available and properly initialized
3737
if (typeof $('body').notification === 'function') {
3838
$('body').notification();
@@ -46,7 +46,7 @@ define([
4646

4747
// Clean up any existing error messages first
4848
$('.message-error').remove();
49-
49+
5050
// Simulate the AJAX error by directly adding the expected error message
5151
$('body').append('<div class="message-error">A technical problem with the server created an error</div>');
5252

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
* See COPYING.txt for license details.
44
*/
55

6+
/* eslint-disable */
67
define([
78
'mage/adminhtml/browser',
89
'jquery'

0 commit comments

Comments
 (0)