test(app): tap the multiple-choice option, not its text
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:
parent
6baa242032
commit
fbed29c5c7
1 changed files with 7 additions and 1 deletions
|
|
@ -142,7 +142,13 @@ void main() {
|
|||
Finder check() => find.widgetWithText(FilledButton, 'Check');
|
||||
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.tap(check());
|
||||
await tester.pumpAndSettle();
|
||||
|
|
|
|||
Loading…
Reference in a new issue