test(app): tap the multiple-choice option, not its text
All checks were successful
CI / check (push) Successful in 9m29s
CI / deploy (push) Successful in 7s

The option's text sits in an IgnorePointer, so the read-only editor
drawing it doesn't take taps for selecting text. Tapping the text made
tap() warn that its centre doesn't hit it; the InkWell around it took
the tap anyway. Tap the option's InkWell instead.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Tizian 「ティツィアーン」 <raisondetredev@pm.me>
This commit is contained in:
Tizian 「ティツィアーン」 2026-10-03 15:46:01 +02:00
commit fbed29c5c7
Signed by: raisondetredev
GPG key ID: 07F6FCF405488B64

View file

@ -142,7 +142,13 @@ void main() {
Finder check() => find.widgetWithText(FilledButton, 'Check'); Finder check() => find.widgetWithText(FilledButton, 'Check');
expect(tester.widget<FilledButton>(check()).onPressed, isNull); expect(tester.widget<FilledButton>(check()).onPressed, isNull);
await tester.tap(find.textContaining('Kyoto', findRichText: true)); // The option takes the tap: its text ignores pointers.
await tester.tap(
find.ancestor(
of: find.textContaining('Kyoto', findRichText: true),
matching: find.byType(InkWell),
),
);
await tester.pump(); await tester.pump();
await tester.tap(check()); await tester.tap(check());
await tester.pumpAndSettle(); await tester.pumpAndSettle();