Skip to content

Commit

Permalink
Updated tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
niklasramo committed Apr 30, 2017
1 parent ab55659 commit bbc99b5
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 48 deletions.
2 changes: 1 addition & 1 deletion gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ gulp.task('test-chrome', function (done) {
(new karma.Server({
configFile: __dirname + '/karma.conf.js',
action: 'run',
browsers: ['Chrome']
browsers: ['Chrome', 'Firefox']
}, function (exitCode) {
done(exitCode);
})).start();
Expand Down
1 change: 1 addition & 0 deletions karma.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ module.exports = function (config) {
plugins: [
'karma-qunit',
'karma-chrome-launcher',
'karma-firefox-launcher',
'karma-sauce-launcher',
'karma-story-reporter'
],
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
"jquery": "^3.2.1",
"karma": "^1.5.0",
"karma-chrome-launcher": "^2.0.0",
"karma-firefox-launcher": "^1.0.1",
"karma-qunit": "^1.2.1",
"karma-sauce-launcher": "^1.1.0",
"karma-story-reporter": "^0.3.1",
Expand Down
1 change: 1 addition & 0 deletions tests/grid-events/dragScroll.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@

grid.on('dragStart', function () {
body.scrollTop = 100;
docElem.scrollTop = 100;
});

grid.on('dragScroll', function (draggedItem, ev) {
Expand Down
13 changes: 3 additions & 10 deletions tests/utils.js
Original file line number Diff line number Diff line change
@@ -1,15 +1,8 @@
(function (window) {

var utils = window.utils = {};
var vendorPrefixes = ['', 'webkit', 'Moz', 'MS', 'ms', 'o'];
var supportsTouch = 'ontouchstart' in window;
var supportsPointerEvents = (function () {
for (var i = 0; i < vendorPrefixes.length; i++) {
if ((vendorPrefixes[i] + 'PointerEvent') in window) {
return true;
}
}
})();
var supportsTouch = !!('TouchEvent' in window);
var supportsPointer = !!('PointerEvent' in window);

//
// Methods
Expand Down Expand Up @@ -78,7 +71,7 @@
};

// Create the hand and finger istances.
var eventMode = supportsPointerEvents ? 'pointer' : supportsTouch ? 'touch' : 'mouse';
var eventMode = supportsPointer ? 'pointer' : supportsTouch ? 'touch' : 'mouse';
var pointerType = supportsTouch ? 'touch' : 'mouse';
var hand = new Hand({timing: 'fastFrame'});
var finger = hand.growFinger(eventMode, {
Expand Down
43 changes: 6 additions & 37 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -61,16 +61,6 @@ align-text@^0.1.1, align-text@^0.1.3:
longest "^1.0.1"
repeat-string "^1.5.2"

amdefine@>=0.0.4:
version "1.0.1"
resolved "https://registry.yarnpkg.com/amdefine/-/amdefine-1.0.1.tgz#4a5282ac164729e93619bcfd3ad151f817ce91f5"

animejs@^2.0.0:
version "2.0.2"
resolved "https://registry.yarnpkg.com/animejs/-/animejs-2.0.2.tgz#6c80ee92253d9429b58b4c0be597772cd7c82d7a"
dependencies:
google-closure-compiler-js "^20170124.0.0"

ansi-escapes@^1.1.0:
version "1.4.0"
resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-1.4.0.tgz#d3a8a83b319aa67793662b13e761c7911422306e"
Expand Down Expand Up @@ -1268,14 +1258,6 @@ glogg@^1.0.0:
dependencies:
sparkles "^1.0.0"

google-closure-compiler-js@^20170124.0.0:
version "20170124.0.0"
resolved "https://registry.yarnpkg.com/google-closure-compiler-js/-/google-closure-compiler-js-20170124.0.0.tgz#cd77291a19a4158eb41fb241688a5e523e250364"
dependencies:
gulp-util "^3.0.7"
minimist "^1.2.0"
webpack-core "^0.6.8"

graceful-fs@^3.0.0:
version "3.0.11"
resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-3.0.11.tgz#7613c778a1afea62f25c630a086d7f3acbbdd818"
Expand Down Expand Up @@ -1331,7 +1313,7 @@ gulp-uglify@^2.1.0:
uglify-save-license "^0.4.1"
vinyl-sourcemaps-apply "^0.2.0"

gulp-util@*, gulp-util@^3.0.0, gulp-util@^3.0.6, gulp-util@^3.0.7, gulp-util@^3.0.8:
gulp-util@*, gulp-util@^3.0.0, gulp-util@^3.0.6, gulp-util@^3.0.8:
version "3.0.8"
resolved "https://registry.yarnpkg.com/gulp-util/-/gulp-util-3.0.8.tgz#0054e1e744502e27c04c187c3ecc505dd54bbb4f"
dependencies:
Expand Down Expand Up @@ -1771,6 +1753,10 @@ karma-chrome-launcher@^2.0.0:
fs-access "^1.0.0"
which "^1.2.1"

karma-firefox-launcher@^1.0.1:
version "1.0.1"
resolved "https://registry.yarnpkg.com/karma-firefox-launcher/-/karma-firefox-launcher-1.0.1.tgz#ce58f47c2013a88156d55a5d61337c099cf5bb51"

karma-qunit@^1.2.1:
version "1.2.1"
resolved "https://registry.yarnpkg.com/karma-qunit/-/karma-qunit-1.2.1.tgz#88252afd2127bc03b0cc31978ed6882b139f470a"
Expand Down Expand Up @@ -2766,20 +2752,10 @@ [email protected]:
socket.io-client "1.7.3"
socket.io-parser "2.3.1"

source-list-map@~0.1.7:
version "0.1.8"
resolved "https://registry.yarnpkg.com/source-list-map/-/source-list-map-0.1.8.tgz#c550b2ab5427f6b3f21f5afead88c4f5587b2106"

source-map@^0.5.1, source-map@^0.5.3, source-map@~0.5.1:
version "0.5.6"
resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.5.6.tgz#75ce38f52bf0733c5a7f0c118d81334a2bb5f412"

source-map@~0.4.1:
version "0.4.4"
resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.4.4.tgz#eba4f5da9c0dc999de68032d8b4f76173652036b"
dependencies:
amdefine ">=0.0.4"

sparkles@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/sparkles/-/sparkles-1.0.0.tgz#1acbbfb592436d10bbe8f785b7cc6f82815012c3"
Expand Down Expand Up @@ -3070,7 +3046,7 @@ [email protected]:
version "0.1.0"
resolved "https://registry.yarnpkg.com/vargs/-/vargs-0.1.0.tgz#6b6184da6520cc3204ce1b407cac26d92609ebff"

velocity-animate@^1.5.0:
velocity-animate@^1.2.0:
version "1.5.0"
resolved "https://registry.yarnpkg.com/velocity-animate/-/velocity-animate-1.5.0.tgz#fc8771d8dfe1136ff02a707e10fbb0957c4b030f"

Expand Down Expand Up @@ -3142,13 +3118,6 @@ wd@^1.0.0:
underscore.string "3.3.4"
vargs "0.1.0"

webpack-core@^0.6.8:
version "0.6.9"
resolved "https://registry.yarnpkg.com/webpack-core/-/webpack-core-0.6.9.tgz#fc571588c8558da77be9efb6debdc5a3b172bdc2"
dependencies:
source-list-map "~0.1.7"
source-map "~0.4.1"

which@^1.2.1, which@^1.2.12:
version "1.2.14"
resolved "https://registry.yarnpkg.com/which/-/which-1.2.14.tgz#9a87c4378f03e827cecaf1acdf56c736c01c14e5"
Expand Down

0 comments on commit bbc99b5

Please sign in to comment.