diff --git a/tests/qunit/skins.minerva.notifications.badge/test_NotificationBadge.js b/tests/qunit/skins.minerva.notifications.badge/test_NotificationBadge.js index d59619a..00cc83e 100644 --- a/tests/qunit/skins.minerva.notifications.badge/test_NotificationBadge.js +++ b/tests/qunit/skins.minerva.notifications.badge/test_NotificationBadge.js @@ -27,8 +27,14 @@ assert.strictEqual( badge.options.notificationCountRaw, 100, 'Number is capped to 100.' ); } ); - QUnit.skip( '#setCount (Eastern Arabic numerals)', function ( assert ) { - var badge = new NotificationBadge( { + QUnit.test( '#setCount (Eastern Arabic numerals)', function ( assert ) { + var badge; + + this.sandbox.stub( mw.language, 'convertNumber' ) + .withArgs( 2 ).returns( '۲' ) + .withArgs( 5 ).returns( '۵' ); + + badge = new NotificationBadge( { overlayManager: this.OverlayManager, el: $( '
۲
' ) } ); diff --git a/tests/qunit/skins.minerva.scripts/test_pageIssues.js b/tests/qunit/skins.minerva.scripts/test_pageIssues.js index b480620..d31df2a 100644 --- a/tests/qunit/skins.minerva.scripts/test_pageIssues.js +++ b/tests/qunit/skins.minerva.scripts/test_pageIssues.js @@ -34,9 +34,10 @@ ), labelText = 'label text', inline = true, + SECTION = '0', processedAmbox = createBanner( new Page( { el: $mockContainer } ), - labelText, '0', inline, overlayManager + labelText, SECTION, inline, overlayManager ); QUnit.module( 'Minerva cleanuptemplates' ); @@ -50,18 +51,20 @@ } ); QUnit.test( 'clicking on the product of createBanner() should trigger a URL change', function ( assert ) { processedAmbox.click(); - assert.strictEqual( window.location.hash, '#/issues/0' ); + assert.strictEqual( window.location.hash, '#/issues/' + SECTION ); } ); // NOTE: Only for PageIssues AB - QUnit.skip( 'clicking on the product of createBanner() should trigger a custom event', function ( assert ) { + QUnit.test( 'clicking on the product of createBanner() should trigger a custom event', function ( assert ) { var mockAction = { action: 'issueClicked', - issueSeverity: [ 'MEDIUM' ] + issuesSeverity: [ 'MEDIUM' ], + sectionNumbers: [ SECTION ] }; mw.trackSubscribe( 'minerva.PageIssuesAB', function ( topic, data ) { assert.deepEqual( mockAction, data ); } ); + processedAmbox.click(); } ); QUnit.test( 'extractMessage', function ( assert ) {