Skip to content

Commit b2a6d6c

Browse files
committed
fix scrollTo usage
1 parent c537ff8 commit b2a6d6c

File tree

1 file changed

+3
-3
lines changed
  • e2e/testcafe-devextreme/tests/scheduler/common/keyboardNavigation

1 file changed

+3
-3
lines changed

e2e/testcafe-devextreme/tests/scheduler/common/keyboardNavigation/appointments.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ test('Document should not scroll on \'End\' press when appointment is focused',
1616
.click(scheduler.getAppointment('Appointment 1').element)
1717
.pressKey('End');
1818

19-
const scrollTop = await ClientFunction(() => document.body.scrollTop)();
19+
const scrollTop = await ClientFunction(() => document.documentElement.scrollTop)();
2020

2121
await t.expect(scrollTop).eql(0);
2222
}).before(async () => {
@@ -59,14 +59,14 @@ test('Document should not scroll on \'Home\' press when appointment is focused',
5959
const initialScrollTop = 40;
6060

6161
await ClientFunction(
62-
(scrollTop) => { document.body.scrollTop = scrollTop; },
62+
(scrollTop) => { document.documentElement.scrollTo(0, scrollTop); },
6363
)(initialScrollTop);
6464

6565
await t
6666
.click(scheduler.getAppointment('Appointment 1').element)
6767
.pressKey('Home');
6868

69-
const scrollTop = await ClientFunction(() => document.body.scrollTop)();
69+
const scrollTop = await ClientFunction(() => document.documentElement.scrollTop)();
7070

7171
await t.expect(scrollTop).eql(initialScrollTop);
7272
}).before(async () => {

0 commit comments

Comments
 (0)