From f81d65bf6d5b37cce9b5a934629ee402461434b1 Mon Sep 17 00:00:00 2001 From: Tobias Gritschacher Date: Tue, 20 Dec 2016 13:23:33 +0000 Subject: [PATCH] Revert "Reset custom separator transform tables in number formatting tests" This reverts commit b46c1052024ded25bff187ae8ee0208e04b48188. Checking if this was fixed by changes to core. Change-Id: Ia8dcae5227163edd5911cd1ea3c1b0213f7e654d --- tests/qunit/RevisionSlider.RevisionListView.test.js | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/tests/qunit/RevisionSlider.RevisionListView.test.js b/tests/qunit/RevisionSlider.RevisionListView.test.js index 3e327df7..9e405005 100644 --- a/tests/qunit/RevisionSlider.RevisionListView.test.js +++ b/tests/qunit/RevisionSlider.RevisionListView.test.js @@ -65,18 +65,14 @@ minor: true } ), tooltip, - tooltipHtml, - originalSeparatorTransformTable = mw.language.getData( 'en', 'separatorTransformTable' ); + tooltipHtml; revision.setRelativeSize( 2100 ); mw.libs.revisionSlider.userOffset = 0; - mw.language.setData( 'en', 'separatorTransformTable', null ); - tooltip = revisionListView.makeTooltip( revision ); tooltipHtml = tooltip.$element.html(); - mw.language.setData( 'en', 'separatorTransformTable', originalSeparatorTransformTable ); assert.ok( tooltipHtml.match( /User1/ ), 'Test the user.' ); assert.ok( tooltipHtml.match( /Hello/ ), 'Test the comment.' ); @@ -84,7 +80,6 @@ assert.ok( tooltipHtml.match( /\+2,100/ ), 'Test the change size.' ); assert.ok( tooltipHtml.match( /26 April 2016 10:27 AM/ ), 'Test the date.' ); assert.ok( tooltipHtml.match( /minor/ ), 'Test minor.' ); - }, mw.config.get( 'wgUserLanguage' ) !== 'en' ); QUnit.test( 'empty user leads to no user line', function ( assert ) { @@ -173,14 +168,11 @@ QUnit.test( 'big change number is formatted correctly', function ( assert ) { var revisionListView = new RevisionListView(), originalUserLangSetting = mw.config.get( 'wgUserLanguage' ), - originalSeparatorTransformTable = mw.language.getData( 'en', 'separatorTransformTable' ), $changeSizeLineHtml; mw.config.set( 'wgUserLanguage', 'en' ); - mw.language.setData( 'en', 'separatorTransformTable', null ); $changeSizeLineHtml = revisionListView.makeChangeSizeLine( 1000 ); mw.config.set( 'wgUserLanguage', originalUserLangSetting ); - mw.language.setData( 'en', 'separatorTransformTable', originalSeparatorTransformTable ); assert.equal( $changeSizeLineHtml.find( '.mw-revslider-change-positive' ).text(), '+1,000' ); } ); @@ -188,14 +180,11 @@ QUnit.test( 'page size is formatted correctly', function ( assert ) { var revisionListView = new RevisionListView(), originalUserLangSetting = mw.config.get( 'wgUserLanguage' ), - originalSeparatorTransformTable = mw.language.getData( 'en', 'separatorTransformTable' ), $pageSizeLineHtml; mw.config.set( 'wgUserLanguage', 'en' ); - mw.language.setData( 'en', 'separatorTransformTable', null ); $pageSizeLineHtml = revisionListView.makePageSizeLine( 1337 ); mw.config.set( 'wgUserLanguage', originalUserLangSetting ); - mw.language.setData( 'en', 'separatorTransformTable', originalSeparatorTransformTable ); assert.ok( $pageSizeLineHtml.text().match( /1,337/ ) ); } );