Removing cursor from e2e tests

stable
Alejandro Alonso 2016-09-23 09:49:32 +02:00 committed by David Barragán Merino
parent ffc04dcc41
commit ea7098cad7
1 changed files with 41 additions and 41 deletions

View File

@ -53,55 +53,55 @@ var config = {
onPrepare: function() { onPrepare: function() {
// disable by default because performance problems on IE // disable by default because performance problems on IE
// track mouse movements // track mouse movements
var trackMouse = function() { // var trackMouse = function() {
angular.module('trackMouse', []).run(function($document) { // angular.module('trackMouse', []).run(function($document) {
function addDot(ev) { // function addDot(ev) {
var color = 'black', // var color = 'black',
size = 6; // size = 6;
switch (ev.type) { // switch (ev.type) {
case 'click': // case 'click':
color = 'red'; // color = 'red';
break; // break;
case 'dblclick': // case 'dblclick':
color = 'blue'; // color = 'blue';
break; // break;
case 'mousemove': // case 'mousemove':
color = 'green'; // color = 'green';
break; // break;
} // }
var dotEl = $('<div></div>') // var dotEl = $('<div></div>')
.css({ // .css({
position: 'fixed', // position: 'fixed',
height: size + 'px', // height: size + 'px',
width: size + 'px', // width: size + 'px',
'background-color': color, // 'background-color': color,
top: ev.clientY, // top: ev.clientY,
left: ev.clientX, // left: ev.clientX,
'z-index': 9999, // 'z-index': 9999,
// make sure this dot won't interfere with the mouse events of other elements // // make sure this dot won't interfere with the mouse events of other elements
'pointer-events': 'none' // 'pointer-events': 'none'
}) // })
.appendTo('body'); // .appendTo('body');
setTimeout(function() { // setTimeout(function() {
dotEl.remove(); // dotEl.remove();
}, 1000); // }, 1000);
} // }
$document.on({ // $document.on({
click: addDot, // click: addDot,
dblclick: addDot, // dblclick: addDot,
mousemove: addDot // mousemove: addDot
}); // });
}); // });
}; // };
browser.addMockModule('trackMouse', trackMouse); // browser.addMockModule('trackMouse', trackMouse);
browser.params.glob.back = argv.back; browser.params.glob.back = argv.back;