feat(app): экраны импорта отчётов, целей, доходов, ребалансировки, налогов и бенчмарков

Импорт (/imports, /instruments/pending) и фаза 4 (/goals, /income,
/rebalance, /tax, аналитика-хаб с benchmarks_card) — по
docs/ai/import-contract.md и docs/ai/phase4-contract.md. file_picker для
загрузки отчёта.
This commit is contained in:
Dmitry
2026-09-19 10:44:38 +03:00
parent 15f5812ea4
commit b69bb4a0c9
52 changed files with 7404 additions and 13 deletions
+20 -2
View File
@@ -3,11 +3,11 @@ import 'package:flutter/material.dart';
import 'package:flutter_test/flutter_test.dart';
void main() {
Widget wrap(double width) {
Widget wrap(double width, {String location = '/'}) {
return MediaQuery(
data: MediaQueryData(size: Size(width, 800)),
child: MaterialApp(
home: AppShell(location: '/', child: Container()),
home: AppShell(location: location, child: Container()),
),
);
}
@@ -23,4 +23,22 @@ void main() {
expect(find.byType(NavigationBar), findsOneWidget);
expect(find.byType(NavigationRail), findsNothing);
});
testWidgets('the resolve screen keeps Импорт selected', (tester) async {
await tester.pumpWidget(wrap(1280, location: '/instruments/pending'));
final rail = tester.widget<NavigationRail>(find.byType(NavigationRail));
expect(
(rail.destinations[rail.selectedIndex!].label as Text).data,
'Импорт',
);
});
testWidgets('a nested route keeps its own section selected', (tester) async {
await tester.pumpWidget(wrap(1280, location: '/portfolio/instrument/311'));
final rail = tester.widget<NavigationRail>(find.byType(NavigationRail));
expect(
(rail.destinations[rail.selectedIndex!].label as Text).data,
'Портфель',
);
});
}