feat(ui): the question mark's explanation offers a link beside OK

HelpButton takes an action, a label and what it does, shown beside OK where
there is more to read elsewhere, as what a map's source keeps (Train's ADR
0030, D63).

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

View file

@ -26,4 +26,22 @@ void main() {
await tester.pumpAndSettle();
expect(find.text('How sources are cited.'), findsNothing);
});
testWidgets('an action offered stands beside OK', (tester) async {
var read = false;
await tester.pumpWidget(
testApp(
Scaffold(
body: HelpButton(
'Map by OpenFreeMap.',
action: (label: 'What it keeps', onPressed: () => read = true),
),
),
),
);
await tester.tap(find.byType(HelpButton));
await tester.pumpAndSettle();
await tester.tap(find.text('What it keeps'));
expect(read, isTrue);
expect(find.text('OK'), findsOneWidget);
});
}