Skip to content

Commit 1e256b0

Browse files
committed
[green] Stabilize Android preview interaction
Signed-off-by: Viwat Vchirawongkwin <viwat.v@chula.ac.th>
1 parent 6760d3d commit 1e256b0

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

app/integration_test/blockly_webview_suite.dart

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -283,8 +283,15 @@ Future<void> _pumpUntil(
283283
}
284284

285285
Future<void> _tapVisible(WidgetTester tester, Finder finder) async {
286+
// A real Android IME can keep the footer below the resized render surface
287+
// even after ensureVisible scrolls its RenderBox. Commit the field edit and
288+
// restore the full viewport before resolving the action's tap position.
289+
FocusManager.instance.primaryFocus?.unfocus();
290+
await SystemChannels.textInput.invokeMethod<void>('TextInput.hide');
291+
await tester.pumpAndSettle();
286292
await tester.ensureVisible(finder);
287293
await tester.pumpAndSettle();
294+
expect(finder.hitTestable(), findsOneWidget);
288295
await tester.tap(finder);
289296
}
290297

0 commit comments

Comments
 (0)