mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Use scrollTop for scrolling tests (#50660)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/50660 Changelog: [internal] This is just a simpler way to test for changes in scroll position. Reviewed By: andrewdacenko Differential Revision: D72860138 fbshipit-source-id: a92d430399255a278f5c3c72005a5288d28310ab
This commit is contained in:
committed by
Facebook GitHub Bot
parent
277d39a216
commit
d18abc8ec7
@@ -727,11 +727,15 @@ describe('Fantom', () => {
|
||||
ReactNativeElement,
|
||||
);
|
||||
|
||||
expect(scrollViewElement.scrollTop).toBe(0);
|
||||
|
||||
Fantom.scrollTo(scrollViewElement, {
|
||||
x: 0,
|
||||
y: 1,
|
||||
});
|
||||
|
||||
expect(scrollViewElement.scrollTop).toBe(1);
|
||||
|
||||
expect(onScroll).toHaveBeenCalledTimes(1);
|
||||
|
||||
const viewElement = ensureInstance(maybeNode, ReactNativeElement);
|
||||
|
||||
Reference in New Issue
Block a user