[MediaWiki-commits] [Gerrit] wikidata...gui[master]: [DNM] test

2017-12-08 Thread Jonas Kress (WMDE) (Code Review)
Jonas Kress (WMDE) has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/396382 )

Change subject: [DNM] test
..

[DNM] test

Change-Id: I6fcca1f6b860dfa5ce47acdf33d341e193eb5494
---
M package.json
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikidata/query/gui 
refs/changes/82/396382/1

diff --git a/package.json b/package.json
index dd50fad..d91864a 100644
--- a/package.json
+++ b/package.json
@@ -24,7 +24,7 @@
 "codemirror": "^5.27.4",
 "d3": "^3.5.17",
 "dimple-js": "^2.1.4",
-"downloadjs": "1.4.4",
+"downloadjs": "1.4.7",
 "ekko-lightbox": "^5.3.0",
 "es6-shim": "^0.35.3",
 "font-awesome": "^4.7.0",

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I6fcca1f6b860dfa5ce47acdf33d341e193eb5494
Gerrit-PatchSet: 1
Gerrit-Project: wikidata/query/gui
Gerrit-Branch: master
Gerrit-Owner: Jonas Kress (WMDE) 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] wikidata...gui[master]: Add test for DownloadJS utf-8

2017-12-08 Thread Jonas Kress (WMDE) (Code Review)
Jonas Kress (WMDE) has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/396325 )

Change subject: Add test for DownloadJS utf-8
..

Add test for DownloadJS utf-8

Bug:T165228
Change-Id: Icb55525d8d32ec7bf2d9489f076528c0c4b890a7
---
M wikibase/tests/index.html
A wikibase/tests/queryService/ui/App.test.js
2 files changed, 33 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikidata/query/gui 
refs/changes/25/396325/1

diff --git a/wikibase/tests/index.html b/wikibase/tests/index.html
index 26cb16e..53d43c9 100644
--- a/wikibase/tests/index.html
+++ b/wikibase/tests/index.html
@@ -35,6 +35,7 @@



+   
 


@@ -64,6 +65,7 @@


 
+   



diff --git a/wikibase/tests/queryService/ui/App.test.js 
b/wikibase/tests/queryService/ui/App.test.js
new file mode 100644
index 000..2b74d05
--- /dev/null
+++ b/wikibase/tests/queryService/ui/App.test.js
@@ -0,0 +1,31 @@
+( function( $, QUnit, sinon, download ) {
+   'use strict';
+
+   QUnit.module( 'wikibase.queryService.ui.App' );
+
+   QUnit.test( 'DownloadJS works with utf-8 ', function( assert ) {
+
+   var stub = sinon.stub( window.document.body, 'appendChild'),
+   data = '{ "foo": "öäüРоссийская中华人民共和国"}',
+   filename = 'file.json',
+   mimetype =  'application/json;charset=utf-8',
+   done = assert.async();
+
+   stub.callsFake( function ( a ) {
+   var url = $( a ).attr( 'href' ),
+   xhr = new XMLHttpRequest();
+
+   xhr.open('GET', url, false);
+   xhr.send();
+   URL.revokeObjectURL(url);
+
+   assert.equal( data, xhr.responseText, 'original data 
and blob data should be the same' );
+   stub.restore();
+   window.document.body.appendChild( a );
+   done();
+   } );
+
+   download( data, filename, mimetype );
+   } );
+
+}( jQuery, QUnit, sinon, download ) );

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Icb55525d8d32ec7bf2d9489f076528c0c4b890a7
Gerrit-PatchSet: 1
Gerrit-Project: wikidata/query/gui
Gerrit-Branch: master
Gerrit-Owner: Jonas Kress (WMDE) 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] wikidata...gui[master]: Move QueryExampleDialog to dialog package

2017-12-07 Thread Jonas Kress (WMDE) (Code Review)
Jonas Kress (WMDE) has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/395986 )

Change subject: Move QueryExampleDialog to dialog package
..

Move QueryExampleDialog to dialog package

Change-Id: Iffc20c36b4f0779d5a9a8f94107518b7b9b0f6e3
---
M README.md
M examples/dialog.html
M index.html
M wikibase/queryService/ui/App.js
R wikibase/queryService/ui/dialog/QueryExampleDialog.js
5 files changed, 8 insertions(+), 7 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikidata/query/gui 
refs/changes/86/395986/1

diff --git a/README.md b/README.md
index 138e750..7306690 100644
--- a/README.md
+++ b/README.md
@@ -71,7 +71,7 @@
 
 A dialog that allows browsing of SPARQL examples.
 ```
-new wikibase.queryService.ui.QueryExampleDialog(  $element, querySamplesApi, 
callback, previewUrl );
+new wikibase.queryService.ui.dialog.QueryExampleDialog(  $element, 
querySamplesApi, callback, previewUrl );
 ```
 See `examples/dialog.html`.
 
diff --git a/examples/dialog.html b/examples/dialog.html
index 577a34a..e1f9738 100644
--- a/examples/dialog.html
+++ b/examples/dialog.html
@@ -23,7 +23,7 @@



-   
+   
 
Dialog
 
@@ -53,7 +53,7 @@

 
$( document ).ready( function() {
-   new wikibase.queryService.ui.QueryExampleDialog(
+   new wikibase.queryService.ui.dialog.QueryExampleDialog(
$( '#QueryExamples' ),
null,
function( query, title ) {
diff --git a/index.html b/index.html
index 9a48cdc..35878a9 100644
--- a/index.html
+++ b/index.html
@@ -377,7 +377,7 @@