SwipeRefreshLayout
पर डाउन-स्वाइप करने पर मेरा ऐप डेटा पुनः लोड करता है। अब मैं एंड्रॉयड टेस्ट किट के साथ इस परीक्षण करने की कोशिश/एस्प्रेसो इस तरह:एस्प्रेसो: SwipeRefreshLayout का परीक्षण कैसे करें?
onView(withId(R.id.my_refresh_layout)).perform(swipeDown());
दुर्भाग्य से इस
android.support.test.espresso.PerformException: Error performing 'fast swipe'
on view 'with id: my.app.package:id/my_refresh_layout'.
...
Caused by: java.lang.RuntimeException: Action will not be performed because the target view
does not match one or more of the following constraints:
at least 90 percent of the view's area is displayed to the user.
Target view: "SwipeRefreshLayout{id=2131689751, res-name=my_refresh_layout, visibility=VISIBLE,
width=480, height=672, has-focus=false, has-focusable=true, has-window-focus=true,
is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=false,
is-selected=false, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=0.0,
child-count=2}"
बेशक साथ विफल रहता है, लेआउट दिखाई दे रहा है और मैन्युअल रूप से स्वाइप काम करता है, लेकिन मैं अनिश्चित हूँ अगर मैं कुछ गलत कर रहा हूँ? लेआउट पूरी स्क्रीन फैलाता है, इसलिए वास्तव में एस्प्रेसो के लिए कुछ कार्रवाई करने के लिए संभव होना चाहिए।