From c65200d27740ad3fcfd7f6bdf27d467af99d380e Mon Sep 17 00:00:00 2001 From: krzystof Date: Fri, 30 Oct 2015 11:41:45 +0000 Subject: [PATCH 1/6] Fix Main file in package.json --- package.json | 2 +- scripts/index.js | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) create mode 100644 scripts/index.js diff --git a/package.json b/package.json index 36f80036..2f50b068 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "bootstrap-material-design", "version": "0.3.1-dev", "description": "Material Design for Bootstrap 3", - "main": "index.js", + "main": "scripts/index.js", "scripts": { "test": "echo \"Error: no test specified\" && exit 1" }, diff --git a/scripts/index.js b/scripts/index.js new file mode 100644 index 00000000..0fd74c8f --- /dev/null +++ b/scripts/index.js @@ -0,0 +1,2 @@ +require('./material.js'); +require('./ripples.js'); \ No newline at end of file From 2b428d85a425962ee6e2b5c29e3c6da3bab7e30b Mon Sep 17 00:00:00 2001 From: krzystof Date: Fri, 30 Oct 2015 11:47:47 +0000 Subject: [PATCH 2/6] Fix jshint warnings --- scripts/index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/index.js b/scripts/index.js index 0fd74c8f..46102ca0 100644 --- a/scripts/index.js +++ b/scripts/index.js @@ -1,2 +1,2 @@ -require('./material.js'); -require('./ripples.js'); \ No newline at end of file +require("./material.js"); +require("./ripples.js"); \ No newline at end of file From 721f398acd659576a057c5630b948910adb2d673 Mon Sep 17 00:00:00 2001 From: krzystof Date: Fri, 30 Oct 2015 12:02:13 +0000 Subject: [PATCH 3/6] Fix grunt task for travis CI --- package.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/package.js b/package.js index e943ba05..0d5fb0e0 100644 --- a/package.js +++ b/package.js @@ -17,12 +17,14 @@ Package.onUse(function (api) { api.versionsFrom(['METEOR@0.9.0', 'METEOR@1.0']); api.use('twbs:bootstrap@3.3.1'); api.use('jquery'); - api.addFiles([ + api.addAssets([ // we bundle all font files, but the client will request only one of them via the CSS @font-face rule 'dist/fonts/Material-Design-Icons.eot', // IE8 or older 'dist/fonts/Material-Design-Icons.svg', // SVG fallback for iOS < 5 - http://caniuse.com/#feat=svg-fonts, http://stackoverflow.com/a/11002874/126903 'dist/fonts/Material-Design-Icons.ttf', // Android Browers 4.1, 4.3 - http://caniuse.com/#feat=ttf 'dist/fonts/Material-Design-Icons.woff', // Supported by all modern browsers + ], where); + api.addFiles([ 'dist/css/material.css', 'dist/css/ripples.css', 'dist/js/material.js', From 9b9b5d240876d9bf98d9b8d206066fc9f6296df6 Mon Sep 17 00:00:00 2001 From: krzystof Date: Fri, 30 Oct 2015 12:17:55 +0000 Subject: [PATCH 4/6] Update Meteor version requirement --- package.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.js b/package.js index 0d5fb0e0..f02c6fd9 100644 --- a/package.js +++ b/package.js @@ -14,7 +14,7 @@ Package.describe({ }); Package.onUse(function (api) { - api.versionsFrom(['METEOR@0.9.0', 'METEOR@1.0']); + api.versionsFrom('METEOR@1.2'); api.use('twbs:bootstrap@3.3.1'); api.use('jquery'); api.addAssets([ From e058c528fbe610d9354ccfa4d1abb5a4414478c9 Mon Sep 17 00:00:00 2001 From: krzystof Date: Fri, 30 Oct 2015 12:24:13 +0000 Subject: [PATCH 5/6] Update package.js in Meteor for travis CI --- meteor/package.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/meteor/package.js b/meteor/package.js index e943ba05..f02c6fd9 100644 --- a/meteor/package.js +++ b/meteor/package.js @@ -14,15 +14,17 @@ Package.describe({ }); Package.onUse(function (api) { - api.versionsFrom(['METEOR@0.9.0', 'METEOR@1.0']); + api.versionsFrom('METEOR@1.2'); api.use('twbs:bootstrap@3.3.1'); api.use('jquery'); - api.addFiles([ + api.addAssets([ // we bundle all font files, but the client will request only one of them via the CSS @font-face rule 'dist/fonts/Material-Design-Icons.eot', // IE8 or older 'dist/fonts/Material-Design-Icons.svg', // SVG fallback for iOS < 5 - http://caniuse.com/#feat=svg-fonts, http://stackoverflow.com/a/11002874/126903 'dist/fonts/Material-Design-Icons.ttf', // Android Browers 4.1, 4.3 - http://caniuse.com/#feat=ttf 'dist/fonts/Material-Design-Icons.woff', // Supported by all modern browsers + ], where); + api.addFiles([ 'dist/css/material.css', 'dist/css/ripples.css', 'dist/js/material.js', From db6bef11064d69c65184df37d4220ab2e99c830d Mon Sep 17 00:00:00 2001 From: krzystof Date: Fri, 30 Oct 2015 12:58:31 +0000 Subject: [PATCH 6/6] Wait for page load during test --- meteor/test.js | 101 +++++++++++++++++++++++++------------------------ 1 file changed, 52 insertions(+), 49 deletions(-) diff --git a/meteor/test.js b/meteor/test.js index 1d66e9cb..bb62ece1 100644 --- a/meteor/test.js +++ b/meteor/test.js @@ -44,60 +44,63 @@ var packageName; // there seems to be no official way of finding out the name o var plugins = ['affix', 'alert', 'button', 'carousel', 'collapse', 'dropdown', 'modal', 'popover', 'scrollspy', 'tab', 'tooltip']; -// test plugins -plugins.forEach(function (plugin) { - Tinytest.add('Plugin - ' + plugin, function (test) { - test.instanceOf($(document.body)[plugin], Function, 'instantiated correctly'); - }); -}); - -// visual check -plugins.forEach(function (plugin) { - - Tinytest.addAsync('Visual check - ' + plugin, function (test, done) { - var bootstrapDropZone = document.createElement('div'); - document.body.appendChild(bootstrapDropZone); - - - HTTP.get('http://rawgit.com/twbs/bootstrap/master/js/tests/visual/' + plugin + '.html', function callback(error, result) { - if (error) { - test.fail('Error getting the test file. Do we have an Internet connection to rawgit.com?'); - } else { - // [^] matches across newlines. Stay within the container div, or else the fragment will attempt to load resources on its own. - bootstrapDropZone.innerHTML = result.content.match(//); - test.ok({message: 'Test passed if the display looks OK *and* clicking dropdowns/popovers/tooltips works.'}); - } - - done(); +document.addEventListener('DOMContentLoaded', function() { + // test plugins + plugins.forEach(function (plugin) { + Tinytest.add('Plugin - ' + plugin, function (test) { + test.instanceOf($(document.body)[plugin], Function, 'instantiated correctly'); + }); }); - }); + // visual check + plugins.forEach(function (plugin) { -}); + Tinytest.addAsync('Visual check - ' + plugin, function (test, done) { + var bootstrapDropZone = document.createElement('div'); + document.body.appendChild(bootstrapDropZone); -Tinytest.addAsync('Visual check - Material Design', function (test, done) { - var bootstrapDropZone = document.createElement('div'); - document.body.appendChild(bootstrapDropZone); + HTTP.get('http://rawgit.com/twbs/bootstrap/master/js/tests/visual/' + plugin + '.html', function callback(error, result) { + if (error) { + test.fail('Error getting the test file. Do we have an Internet connection to rawgit.com?'); + } else { + // [^] matches across newlines. Stay within the container div, or else the fragment will attempt to load resources on its own. + bootstrapDropZone.innerHTML = result.content.match(//); + test.ok({message: 'Test passed if the display looks OK *and* clicking dropdowns/popovers/tooltips works.'}); + } - HTTP.get('http://rawgit.com/FezVrasta/bootstrap-material-design/master/bootstrap-elements.html', function callback(error, result) { - if (error) { - test.fail('Error getting the FezVrasta test file. Do we have an Internet connection to rawgit.com?'); - } else { - // [^] matches across newlines. Stay within the container div, or else the fragment will attempt to load resources on its own. - bootstrapDropZone.innerHTML = result.content.match(/