From 4e125c5095c8763886958a93460bfe19d9cb4d26 Mon Sep 17 00:00:00 2001 From: Kosta Harlan Date: Wed, 2 Mar 2022 22:32:09 +0100 Subject: [PATCH] tests: Remove overlayManager from NotificationBadge params Doesn't seem to be used anymore Change-Id: I18f2709f000ca7469432a4c4bb919adfa0b3e829 --- extension.json | 1 - tests/qunit/mobile/test_NotificationBadge.js | 17 ++++------------- 2 files changed, 4 insertions(+), 14 deletions(-) diff --git a/extension.json b/extension.json index 3eb3fe985..b3040c909 100644 --- a/extension.json +++ b/extension.json @@ -83,7 +83,6 @@ "localBasePath": "", "remoteExtPath": "Echo", "dependencies": [ - "mobile.startup", "ext.echo.dm", "ext.echo.mobile" ], diff --git a/tests/qunit/mobile/test_NotificationBadge.js b/tests/qunit/mobile/test_NotificationBadge.js index 1191190dc..e8305942b 100644 --- a/tests/qunit/mobile/test_NotificationBadge.js +++ b/tests/qunit/mobile/test_NotificationBadge.js @@ -1,17 +1,11 @@ -( function ( M ) { - var OverlayManager = M.require( 'mobile.startup' ).OverlayManager, - NotificationBadge = require( 'ext.echo.mobile' ).NotificationBadge; +( function () { + var NotificationBadge = require( 'ext.echo.mobile' ).NotificationBadge; - QUnit.module( 'ext.echo.mobile - NotificationBadge', { - beforeEach: function () { - this.OverlayManager = OverlayManager.getSingleton(); - } - } ); + QUnit.module( 'ext.echo.mobile - NotificationBadge', {} ); QUnit.test( '#setCount', function ( assert ) { var initialClassExpectationsMet, badge = new NotificationBadge( { - overlayManager: this.OverlayManager, hasNotifications: true, hasUnseenNotifications: true, notificationCountRaw: 5 @@ -37,7 +31,6 @@ .withArgs( 'echo-badge-count', '۲' ).returns( { text: function () { return '۲'; } } ); badge = new NotificationBadge( { - overlayManager: this.OverlayManager, el: $( '
۲
' ) } ); assert.strictEqual( badge.options.notificationCountRaw, 2, @@ -52,7 +45,6 @@ QUnit.test( '#render [hasUnseenNotifications]', function ( assert ) { var badge = new NotificationBadge( { notificationCountRaw: 0, - overlayManager: this.OverlayManager, hasNotifications: false, hasUnseenNotifications: false } ); @@ -62,7 +54,6 @@ QUnit.test( '#markAsSeen', function ( assert ) { var badge = new NotificationBadge( { notificationCountRaw: 2, - overlayManager: this.OverlayManager, hasNotifications: true, hasUnseenNotifications: true } ); @@ -73,4 +64,4 @@ assert.strictEqual( badge.$el.find( '.notification-unseen' ).length, 0, 'Unseen class disappears after markAsSeen called.' ); } ); -}( mw.mobileFrontend ) ); +}() );