mirror of
https://github.com/kuhyx/testsAndMisc-archive.git
synced 2026-07-04 13:43:02 +02:00
Two-package monorepo: - horatio_core: pure Dart package (parser, SRS, planner) - horatio_app: Flutter UI (Bloc/Cubit, GoRouter, TTS) Features: - Script import (txt, docx, pdf) with drag-and-drop - Four script format parsers (colon, bracketed, parenthetical, screenplay) - SM-2 spaced repetition for line memorization - Rehearsal mode with TTS and line comparison - 5 bundled public domain scripts Quality: - 83 core tests + 160 app tests, both 100% branch coverage - Strict analysis (130+ lint rules, fatal-infos) - Dead code detection script (dead_code.sh) - run.sh pipeline: analyze, test, dead-code, run, web - Pre-commit hook for horatio test coverage
31 lines
968 B
Dart
31 lines
968 B
Dart
import 'dart:async';
|
|
|
|
import 'package:flutter_test/flutter_test.dart';
|
|
import 'package:horatio_app/app.dart';
|
|
import 'package:horatio_app/router.dart';
|
|
import 'package:horatio_core/horatio_core.dart';
|
|
|
|
void main() {
|
|
testWidgets('HoratioApp builds without crashing', (tester) async {
|
|
await tester.pumpWidget(const HoratioApp());
|
|
await tester.pumpAndSettle();
|
|
|
|
// The app should render the home screen.
|
|
expect(find.text('Horatio'), findsOneWidget);
|
|
});
|
|
|
|
testWidgets('SrsReviewCubit is created when srs-review route is visited',
|
|
(tester) async {
|
|
await tester.pumpWidget(const HoratioApp());
|
|
await tester.pumpAndSettle();
|
|
|
|
unawaited(appRouter.push(RoutePaths.srsReview, extra: <SrsCard>[
|
|
SrsCard(id: 'c1', cueText: 'Cue', answerText: 'Ans'),
|
|
]));
|
|
await tester.pumpAndSettle();
|
|
|
|
// SrsReviewScreen renders — the BlocProvider.create ran.
|
|
expect(find.text('No review session active.'), findsOneWidget);
|
|
});
|
|
}
|