feat(app): section titles read as dividers; one Rendered/Raw switch per definition; schedule rows with labelled facts and a status pill

This commit is contained in:
2026-10-23 22:09:46 +01:00
parent c467872ee3
commit b44cecf35c
10 changed files with 355 additions and 77 deletions
@@ -282,6 +282,23 @@ void main() {
expect(outcomes.strutStyle, raw.strutStyle);
});
testWidgets('one Rendered/Raw switch governs the whole definition', (
tester,
) async {
await tester.pumpWidget(_material(_view()));
expect(find.byKey(const Key('markdown-source-mode')), findsOneWidget);
expect(_text('Plan the change.'), findsOneWidget);
await tester.tap(find.text('Rendered'));
await tester.pumpAndSettle();
expect(
find
.byType(SelectableText)
.evaluate()
.map((e) => (e.widget as SelectableText).data),
isNot(contains('Plan the change.')),
);
});
test('field labels are the web words', () {
expect(stageConfigLabel('budget_usd'), 'Budget (USD)');
expect(stageConfigLabel('budget_tokens'), 'Budget (tokens)');
@@ -61,7 +61,7 @@ void main() {
expect(find.text('Schedules (1)'), findsOneWidget);
expect(find.text('Research batteries'), findsOneWidget);
expect(
find.text('Pinned v3 · Every 24h · mon, wed · Europe/London'),
find.text('Every 24h · mon, wed · Europe/London'),
findsOneWidget,
);
expect(find.byKey(scheduleAddKey), findsOneWidget);
@@ -47,18 +47,18 @@ void main() {
expect(find.text('Schedules (2)'), findsOneWidget);
expect(find.text('Research batteries'), findsOneWidget);
expect(
find.text('Pinned v2 · Every 24h · mon, wed · Europe/London'),
find.text('Every 24h · mon, wed · Europe/London'),
findsOneWidget,
);
expect(find.text('Next: Paused'), findsOneWidget);
expect(find.text('Paused'), findsWidgets);
expect(find.text('Nightly report'), findsOneWidget);
expect(
find.text('Pinned v5 · 10:00, 18:30 · Server timezone'),
find.text('10:00, 18:30 · Server timezone'),
findsOneWidget,
);
expect(find.text('Enabled'), findsOneWidget);
expect(find.text('Paused'), findsOneWidget);
expect(find.text('Next: Paused'), findsOneWidget);
expect(find.text('Paused'), findsWidgets);
expect(find.text('Paused'), findsWidgets);
expect(find.byKey(scheduleRowEditKey(8)), findsOneWidget);
expect(find.byKey(scheduleRowToggleKey(9)), findsOneWidget);
expect(gateway.calls.map((call) => call.type), ['list_schedules']);
@@ -244,8 +244,8 @@ void main() {
final call = gateway.callsOf('save_schedule').single;
expect(call.fields.containsKey('request_key'), isFalse);
expect(call.fields['schedule'], {...original, 'enabled': false});
expect(find.text('Paused'), findsOneWidget);
expect(find.text('Next: Paused'), findsOneWidget);
expect(find.text('Paused'), findsWidgets);
expect(find.text('Paused'), findsWidgets);
expect(find.byKey(scheduleRowToggleKey(8)), findsOneWidget);
expect(find.text('Enable'), findsOneWidget);
expect(gateway.calls.map((call) => call.type), [