test(i18n): cover the i18n facade, selector, manifest routing + locale (T-462)

Tests for the epic's new code so the 95% floor holds: ClideSettings.i18n
string/interpolated null-safe + localizedCommandTitle; settings-renderer
localization (section/field/help/select/file, project-scope tag, didUpdateWidget);
extension-activation rollback + settings-contribution unregister; the Dutch
gate check; RootShell applying app.locale on boot; and prompt/conversation
tool-body + file-ref coverage. Also harden the menu toggle re-tap (capture the
button point while stable, then tapAt) so it no longer throws getCenter under
the serial coverage load.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-06-20 18:26:30 +02:00
co-authored by Claude Opus 4.8
parent 328902a3d8
commit 9d7ab35a19
10 changed files with 550 additions and 4 deletions
@@ -162,6 +162,38 @@ void main() {
expect(find.text('Hoverable'), findsOneWidget);
});
testWidgets('hovering a NON-selected palette row paints the hover background', (tester) async {
// The first row is selected (selectedIndex 0), so its color comes from the
// `selected` branch. Hovering the SECOND (unselected) row exercises the
// `_hover ? listItemHoverBackground` arm that the selected row skips.
f.services.commands.register(
CommandContribution(
id: 'h1',
command: 'first.cmd',
title: 'FirstRow',
run: (_) async => IpcResponse.ok(id: '', data: const {}),
),
);
f.services.commands.register(
CommandContribution(
id: 'h2',
command: 'second.cmd',
title: 'SecondRow',
run: (_) async => IpcResponse.ok(id: '', data: const {}),
),
);
f.services.palette.open();
await tester.pumpWidget(harness(f, Stack(children: const [ClidePalette()])));
await tester.pumpAndSettle();
final gesture = await tester.createGesture(kind: PointerDeviceKind.mouse);
addTearDown(gesture.removePointer);
await gesture.addPointer(location: Offset.zero);
await gesture.moveTo(tester.getCenter(find.text('SecondRow')));
await tester.pumpAndSettle();
expect(find.text('SecondRow'), findsOneWidget);
});
testWidgets('arrow keys move the highlighted command (T-100)', (tester) async {
for (final id in ['a', 'b', 'c']) {
f.services.commands.register(