feat(app): finish the visit session export facts
Split the export model/classification from the session wording, add the no-session, selected-repair and missing-evidence coverage, and update the parity matrix and R4 note. The visit probe now passes the scheme name its fixture reads, asserts the painted theme before capture and re-captures the export states.
This commit is contained in:
@@ -169,6 +169,79 @@ void main() {
|
||||
expect(find.text('Open session-repair-2.html'), findsOneWidget);
|
||||
});
|
||||
|
||||
testWidgets('a visit with no session shows no export row', (tester) async {
|
||||
final step = sessionStep()
|
||||
..remove('session_id')
|
||||
..remove('session_export')
|
||||
..remove('artifacts')
|
||||
..remove('provider')
|
||||
..remove('model');
|
||||
await pumpSessionExport(tester, step);
|
||||
|
||||
expect(find.byKey(const Key('run-visit-session-export')), findsNothing);
|
||||
expect(
|
||||
find.byKey(const Key('run-visit-session-export-reason')),
|
||||
findsNothing,
|
||||
);
|
||||
expect(find.text(visitSessionNone), findsOneWidget);
|
||||
});
|
||||
|
||||
testWidgets('a selected repair keeps its diagnostic off the Reason row', (
|
||||
tester,
|
||||
) async {
|
||||
final step = sessionStep()..remove('session_export');
|
||||
step['session_export_repairs'] = <dynamic>[
|
||||
<String, dynamic>{
|
||||
'html': 'session-repair-1.html',
|
||||
'status': 'failed',
|
||||
'messages': 0,
|
||||
'diagnostic': 'The repair read failed.',
|
||||
},
|
||||
];
|
||||
step['artifacts'] = <dynamic>[artifact('session-repair-1.html')];
|
||||
await pumpSessionExport(tester, step);
|
||||
|
||||
expect(find.text('repair'), findsOneWidget);
|
||||
expect(
|
||||
find.byKey(const Key('run-visit-session-export-reason')),
|
||||
findsNothing,
|
||||
);
|
||||
expect(
|
||||
find.text('failed · 0 messages. The repair read failed.'),
|
||||
findsOneWidget,
|
||||
);
|
||||
expect(find.text('Open session-repair-1.html'), findsOneWidget);
|
||||
});
|
||||
|
||||
testWidgets('evidence whose named file is missing keeps its word', (
|
||||
tester,
|
||||
) async {
|
||||
final step = sessionStep();
|
||||
step['session_export'] = <String, dynamic>{
|
||||
'html': 'session.html',
|
||||
'status': 'quarantined',
|
||||
'diagnostic': 'The server quarantined this export.',
|
||||
};
|
||||
step['artifacts'] = <dynamic>[artifact('plan.csv')];
|
||||
await pumpSessionExport(tester, step);
|
||||
|
||||
expect(find.text('quarantined'), findsOneWidget);
|
||||
expect(find.text('missing'), findsNothing);
|
||||
// The document is absent, so the diagnostic stays in the recorded
|
||||
// sentence rather than a Reason row.
|
||||
expect(
|
||||
find.byKey(const Key('run-visit-session-export-reason')),
|
||||
findsNothing,
|
||||
);
|
||||
expect(
|
||||
find.textContaining(
|
||||
'Its export is quarantined. The server quarantined this export.',
|
||||
),
|
||||
findsOneWidget,
|
||||
);
|
||||
expect(find.textContaining('Open '), findsNothing);
|
||||
});
|
||||
|
||||
testWidgets('an unrecognised export status is kept verbatim', (tester) async {
|
||||
final step = sessionStep();
|
||||
step['session_export'] = <String, dynamic>{
|
||||
|
||||
Reference in New Issue
Block a user