Skip to content

Commit 643b925

Browse files
committed
Fix test for Linux.
1 parent d95866f commit 643b925

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

test/integration/mouse.js

+4-1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
var test = require('tape');
33
var robot = require('../..');
44
var targetpractice = require('targetpractice/index.js');
5+
var os = require('os');
56
var elements;
67

78
robot.setMouseDelay(100);
@@ -82,8 +83,10 @@ test('Test scrolling.', { timeout: 10000 }, function(t)
8283

8384
target.on('scroll', function(element)
8485
{
86+
// On Linux the textarea scrolls more aggressively.
87+
const expectedScroll = os.platform() === 'linux' ? 180 : 10;
8588
t.equal(element.id, 'textarea_1', 'Confirm textarea_1 was used.');
86-
t.equal(element.scroll_y, 10, 'Confirm scroll to 10.');
89+
t.equal(element.scroll_y, expectedScroll, 'Confirm scroll to 10.');
8790
});
8891

8992
t.on('end', function()

0 commit comments

Comments
 (0)