mirror of
https://github.com/novnc/noVNC.git
synced 2026-06-03 19:09:41 +00:00
Add unit test for wheel + buttons pressed
This commit is contained in:
@@ -3964,6 +3964,21 @@ describe('Remote Frame Buffer protocol client', function () {
|
||||
expect(pointerEvent.secondCall).to.have.been.calledWith(client._sock,
|
||||
10, 10, 0);
|
||||
});
|
||||
|
||||
it('should handle wheel event with buttons pressed', function () {
|
||||
sendMouseButtonEvent(10, 10, true, 0, client);
|
||||
sendWheelEvent(10, 10, 0, 50);
|
||||
|
||||
expect(pointerEvent).to.have.been.called.calledThrice;
|
||||
|
||||
expect(pointerEvent.firstCall).to.have.been.calledWith(client._sock,
|
||||
10, 10, 0x1);
|
||||
expect(pointerEvent.secondCall).to.have.been.calledWith(client._sock,
|
||||
10, 10, 0x11);
|
||||
expect(pointerEvent.thirdCall).to.have.been.calledWith(client._sock,
|
||||
10, 10, 0x1);
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
describe('Keyboard events', function () {
|
||||
|
||||
Reference in New Issue
Block a user