@@ -10,7 +10,7 @@ Future<void> assertOptionsPromptIsDisplayed(PatrolIntegrationTester $) async {
1010 identifier: 'IBGReportBugPromptOptionAccessibilityIdentifier' ),
1111 android: AndroidSelector (
1212 resourceName:
13- 'com.instabug.flutter.example:id/instabug_main_prompt_container' )));
13+ 'com.instabug.flutter.example:id/instabug_main_prompt_container' )));
1414
1515 expect (
1616 isAndroid
@@ -91,18 +91,20 @@ void main() {
9191
9292 await $("Two Fingers Swipe Left" ).scrollTo ().tap ();
9393 await wait (second: 1 );
94- final gesture1 = await $.tester.startGesture (const Offset (300 , 400 )); // finger 1
95- final gesture2 = await $.tester.startGesture (const Offset (300 , 600 )); // finger 2
94+ final gesture1 =
95+ await $.tester.startGesture (const Offset (300 , 400 )); // finger 1
96+ final gesture2 =
97+ await $.tester.startGesture (const Offset (300 , 600 )); // finger 2
9698
9799// Swipe both fingers to the left (same direction)
98- await gesture1.moveBy (const Offset (- 150 , 0 ));
99- await gesture2.moveBy (const Offset (- 150 , 0 ));
100+ await gesture1.moveBy (const Offset (- 150 , 0 ));
101+ await gesture2.moveBy (const Offset (- 150 , 0 ));
100102
101103// End gestures
102104 await gesture1.up ();
103105 await gesture2.up ();
104106
105- await wait (second: 1 );
107+ await wait (second: 1 );
106108 assertOptionsPromptIsDisplayed ($);
107109 },
108110 framePolicy: LiveTestWidgetsFlutterBindingFramePolicy .fullyLive,
@@ -114,10 +116,11 @@ void main() {
114116
115117 await wait (second: 1 );
116118 final floatingButton = await $.native2.getNativeViews (NativeSelector (
117- ios: IOSSelector (identifier: 'IBGFloatingButtonAccessibilityIdentifier' ),
119+ ios:
120+ IOSSelector (identifier: 'IBGFloatingButtonAccessibilityIdentifier' ),
118121 android: AndroidSelector (
119122 resourceName:
120- 'com.instabug.flutter.example:id/instabug_floating_button' ),
123+ 'com.instabug.flutter.example:id/instabug_floating_button' ),
121124 ));
122125
123126 expect (
@@ -151,7 +154,7 @@ void main() {
151154 identifier: 'IBGBugVCReproStepsDisclaimerAccessibilityIdentifier' ),
152155 android: AndroidSelector (
153156 resourceName:
154- 'com.instabug.flutter.example:id/instabug_text_view_repro_steps_disclaimer' ),
157+ 'com.instabug.flutter.example:id/instabug_text_view_repro_steps_disclaimer' ),
155158 ));
156159
157160 await wait (miliSeconds: 1000 );
@@ -161,10 +164,10 @@ void main() {
161164 identifier: 'IBGReproStepsTableCellViewAccessibilityIdentifier' ),
162165 android: AndroidSelector (
163166 resourceName:
164- 'com.instabug.flutter.example:id/ib_bug_repro_step_screenshot' ),
167+ 'com.instabug.flutter.example:id/ib_bug_repro_step_screenshot' ),
165168 ));
166169
167- final count = isAndroid
170+ final count = isAndroid
168171 ? screenshots.androidViews.length
169172 : screenshots.iosViews.length;
170173
@@ -176,51 +179,39 @@ void main() {
176179
177180 await $('Move Floating Button to Left' ).scrollTo ().tap ();
178181
179-
180182 await wait (second: 5 );
181183
182184 final floatingButton = await $.native2.getNativeViews (NativeSelector (
183- ios: IOSSelector (
184- identifier: 'IBGFloatingButtonAccessibilityIdentifier' ),
185+ ios:
186+ IOSSelector ( identifier: 'IBGFloatingButtonAccessibilityIdentifier' ),
185187 android: AndroidSelector (
186188 resourceName:
187- 'com.instabug.flutter.example:id/instabug_floating_button' ),
189+ 'com.instabug.flutter.example:id/instabug_floating_button' ),
188190 ));
189191
190-
191192 await wait (second: 2 );
192193
193194 final size = $.tester.view.physicalSize / $.tester.view.devicePixelRatio;
194195 final width = size.width;
195196 $.log (floatingButton.androidViews.length.toString ());
196197
197- $.log (floatingButton.androidViews.first.visibleBounds.minX.toString ());
198- $.log (floatingButton.androidViews.first.visibleBounds.maxX.toString ());
199- $.log ((width / 2 ).toString ());
200-
201-
202198 bool isLeft = false ;
203- if (isAndroid &&
204- floatingButton.androidViews.isNotEmpty) {
205-
206-
199+ if (isAndroid && floatingButton.androidViews.isNotEmpty) {
207200 $.log (floatingButton.androidViews.first.visibleBounds.minX.toString ());
208201 $.log (floatingButton.androidViews.first.visibleBounds.maxX.toString ());
209202 $.log ((width / 2 ).toString ());
210203
211- isLeft = floatingButton.androidViews.first.visibleBounds.minX <
212- (width / 2 );
213- } else if ((! isAndroid) &&
214- floatingButton.iosViews.isNotEmpty) {
215- isLeft = floatingButton.iosViews.first.frame.minX <
216- (width / 2 );
204+ isLeft =
205+ floatingButton.androidViews.first.visibleBounds.minX < (width / 2 );
206+ } else if ((! isAndroid) && floatingButton.iosViews.isNotEmpty) {
207+ isLeft = floatingButton.iosViews.first.frame.minX < (width / 2 );
217208 }
218209
219210 expect (isLeft, true );
220211 });
221212
222- patrolTest (
223- 'onDismiss callback triggers when prompt is cancelled' , ($) async {
213+ patrolTest ('onDismiss callback triggers when prompt is cancelled' ,
214+ ($) async {
224215 await init ($);
225216
226217 await $('Set On Dismiss Callback' ).scrollTo ().tap ();
@@ -236,10 +227,9 @@ void main() {
236227
237228 await wait (second: 4 );
238229
239- final callbackWidget = $('onDismiss callback called with DismissType.cancel and ReportType.other' );
230+ final callbackWidget = $(
231+ 'onDismiss callback called with DismissType.cancel and ReportType.other' );
240232 expect (callbackWidget, findsOneWidget);
241233 });
242-
243234 });
244-
245- }
235+ }
0 commit comments