Gergő Tisza has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/111391

Change subject: Fix merge problem with categories
......................................................................

Fix merge problem with categories

Change-Id: I628bffeb4cac16cf50def6d5562fb9e2b9fa8933
---
M resources/mmv/provider/mmv.provider.ImageInfo.js
M tests/qunit/provider/mmv.provider.ImageInfo.test.js
2 files changed, 8 insertions(+), 2 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MultimediaViewer 
refs/changes/91/111391/1

diff --git a/resources/mmv/provider/mmv.provider.ImageInfo.js 
b/resources/mmv/provider/mmv.provider.ImageInfo.js
index b9fbb55..0c477dd 100644
--- a/resources/mmv/provider/mmv.provider.ImageInfo.js
+++ b/resources/mmv/provider/mmv.provider.ImageInfo.js
@@ -62,7 +62,8 @@
                'Credit',
                'Artist',
                'GPSLatitude',
-               'GPSLongitude'
+               'GPSLongitude',
+               'Categories'
        ].join('|');
 
        /**
diff --git a/tests/qunit/provider/mmv.provider.ImageInfo.test.js 
b/tests/qunit/provider/mmv.provider.ImageInfo.test.js
index 71d53ea..b12b47e 100644
--- a/tests/qunit/provider/mmv.provider.ImageInfo.test.js
+++ b/tests/qunit/provider/mmv.provider.ImageInfo.test.js
@@ -25,7 +25,7 @@
                assert.ok( imageInfoProvider );
        } );
 
-       QUnit.asyncTest( 'ImageInfo get test', 18, function ( assert ) {
+       QUnit.asyncTest( 'ImageInfo get test', 19, function ( assert ) {
                var apiCallCount = 0,
                        api = { get: function() {
                                apiCallCount++;
@@ -84,6 +84,10 @@
                                                                                
        Artist: {
                                                                                
                value: 'Wikimeda',
                                                                                
                source: 'commons-desc-page'
+                                                                               
        },
+                                                                               
        Categories: {
+                                                                               
                value: 'a|b|cd',
+                                                                               
                source: 'commons-categories'
                                                                                
        }
                                                                                
},
                                                                                
mime: 'image/jpeg',
@@ -116,6 +120,7 @@
                        assert.strictEqual( image.license, 'cc0', 'license is 
set correctly' );
                        assert.strictEqual( image.latitude, 90, 'latitude is 
set correctly' );
                        assert.strictEqual( image.longitude, 180, 'longitude is 
set correctly' );
+                       assert.strictEqual( image.categories.length, 3, 
'categories are set correctly' );
                } ).then( function() {
                        // call the data provider a second time to check caching
                        return imageInfoProvider.get( file );

-- 
To view, visit https://gerrit.wikimedia.org/r/111391
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I628bffeb4cac16cf50def6d5562fb9e2b9fa8933
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MultimediaViewer
Gerrit-Branch: master
Gerrit-Owner: GergÅ‘ Tisza <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to