feat(app): collapsibles keep their titles pinned; stage facts are coloured and grouped; input and output copy
This commit is contained in:
@@ -66,7 +66,7 @@ void main() {
|
||||
);
|
||||
expect(find.byKey(const Key('run-visit-title')), findsOneWidget);
|
||||
expect(find.text('plan · visit 1'), findsOneWidget);
|
||||
expect(find.textContaining('Status:'), findsOneWidget);
|
||||
expect(find.byKey(const Key('run-visit-facts-grid')), findsOneWidget);
|
||||
expect(find.textContaining('audit · visit'), findsNothing);
|
||||
});
|
||||
|
||||
|
||||
@@ -17,14 +17,16 @@ void main() {
|
||||
|
||||
expect(find.byKey(const Key('run-visit-pane')), findsOneWidget);
|
||||
expect(find.text('plan · visit 1'), findsOneWidget);
|
||||
for (final value in [
|
||||
'Status: completed',
|
||||
'Outcome: success',
|
||||
'Duration: 2m 5s',
|
||||
'Provider/model: anthropic / claude-x',
|
||||
'Target: build',
|
||||
// Each fact as its label over its value; several share a line.
|
||||
for (final (label, value) in [
|
||||
('Status', 'completed'),
|
||||
('Outcome', 'success'),
|
||||
('Duration', '2m 5s'),
|
||||
('Provider/model', 'anthropic / claude-x'),
|
||||
('Target', 'build'),
|
||||
]) {
|
||||
expect(find.textContaining(value), findsOneWidget, reason: value);
|
||||
expect(find.text(label), findsWidgets, reason: label);
|
||||
expect(find.text(value), findsWidgets, reason: value);
|
||||
}
|
||||
for (final value in ['approve', 'Looks good.', 'Plan checked.']) {
|
||||
expect(find.text(value), findsOneWidget, reason: value);
|
||||
@@ -32,16 +34,17 @@ void main() {
|
||||
expect(find.text('Verdict'), findsOneWidget);
|
||||
expect(find.text('Diagnostic'), findsOneWidget);
|
||||
|
||||
// The title, its facts and the section tabs share one leading edge; the
|
||||
// Cupertino control's own default inset used to push the tabs 16 in.
|
||||
// The title and its facts share one leading edge.
|
||||
final title = tester.getTopLeft(find.text('plan · visit 1')).dx;
|
||||
expect(
|
||||
tester.getTopLeft(find.textContaining('Status: completed')).dx,
|
||||
tester.getTopLeft(find.byKey(const Key('run-visit-facts-grid'))).dx,
|
||||
title,
|
||||
);
|
||||
// A centred segment label sits ~49 in from a 16 inset control (65), but
|
||||
// 81 behind the control's default 16 inset.
|
||||
expect(tester.getTopLeft(find.text('Input')).dx, lessThan(title + 56));
|
||||
// Status and duration share a line.
|
||||
expect(
|
||||
tester.getTopLeft(find.text('completed')).dy,
|
||||
moreOrLessEquals(tester.getTopLeft(find.text('2m 5s')).dy, epsilon: 4),
|
||||
);
|
||||
});
|
||||
|
||||
testWidgets('${platform.name} duration hides without both timestamps', (
|
||||
@@ -55,7 +58,7 @@ void main() {
|
||||
|
||||
expect(find.textContaining('Duration'), findsNothing);
|
||||
expect(find.textContaining('0s'), findsNothing);
|
||||
expect(find.textContaining('Status: completed'), findsOneWidget);
|
||||
expect(find.text('completed'), findsOneWidget);
|
||||
});
|
||||
|
||||
testWidgets('${platform.name} absent provider/model is not invented', (
|
||||
|
||||
@@ -153,15 +153,14 @@ void main() {
|
||||
tester.getTopLeft(find.byKey(const Key('run-status-kicker'))).dy,
|
||||
lessThan(tester.getTopLeft(find.text('Nightly build')).dy),
|
||||
);
|
||||
if (platform == AppPlatform.material) {
|
||||
expect(
|
||||
tester.widget(find.byKey(const ValueKey('run-detail-summary-input'))),
|
||||
isA<ExpansionTile>(),
|
||||
);
|
||||
} else {
|
||||
// Input and Output are sticky collapsibles on both hosts.
|
||||
expect(
|
||||
find.byKey(const ValueKey('run-detail-summary-input')),
|
||||
findsOneWidget,
|
||||
);
|
||||
if (platform == AppPlatform.cupertino) {
|
||||
expect(find.byType(Material), findsNothing);
|
||||
expect(find.byType(Chip), findsNothing);
|
||||
expect(find.byType(CupertinoExpansionTile), findsWidgets);
|
||||
}
|
||||
|
||||
Future<void> tapTab(String label) async {
|
||||
|
||||
Reference in New Issue
Block a user