Skip to content

Commit ec14e62

Browse files
committed
fix(android): correct scrollUp and scrollDown mouseWheel delta values
1 parent 953553e commit ec14e62

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

packages/android/tests/unit-test/page.test.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -607,20 +607,20 @@ describe('AndroidDevice', () => {
607607
});
608608
});
609609

610-
it('scrollUp should call mouseWheel with positive Y delta', async () => {
610+
it('scrollUp should call mouseWheel with negative Y delta', async () => {
611611
const wheelSpy = vi
612612
.spyOn(device as any, 'mouseWheel')
613613
.mockResolvedValue(undefined);
614614
await device.scrollUp(100);
615-
expect(wheelSpy).toHaveBeenCalledWith(0, 100);
615+
expect(wheelSpy).toHaveBeenCalledWith(0, -100);
616616
});
617617

618-
it('scrollDown should call mouseWheel with negative Y delta', async () => {
618+
it('scrollDown should call mouseWheel with positive Y delta', async () => {
619619
const wheelSpy = vi
620620
.spyOn(device as any, 'mouseWheel')
621621
.mockResolvedValue(undefined);
622622
await device.scrollDown(100);
623-
expect(wheelSpy).toHaveBeenCalledWith(0, -100);
623+
expect(wheelSpy).toHaveBeenCalledWith(0, 100);
624624
});
625625
});
626626

0 commit comments

Comments
 (0)