price per item is printed

This commit is contained in:
atseirjo
2026-10-28 12:32:49 +01:00
parent c32adbad50
commit 77fbe16867
31 changed files with 656 additions and 55 deletions
+47
View File
@@ -236,6 +236,53 @@ void main() {
expect(find.textContaining('nicht gefunden'), findsOneWidget);
});
testWidgets('Inventory marks saved profiles and updates after creating one', (
tester,
) async {
tester.view.physicalSize = const Size(1280, 1400);
tester.view.devicePixelRatio = 1;
addTearDown(tester.view.resetPhysicalSize);
addTearDown(tester.view.resetDevicePixelRatio);
await tester.pumpWidget(
GetMaterialApp(
theme: AppTheme.light,
initialRoute: HomeView.routeName,
getPages: SampleRouts.samplePages,
),
);
await tester.pumpAndSettle();
final home = Get.find<HomeController>();
Finder badgeFor(String id) => find.descendant(
of: find.byKey(ValueKey(id)),
matching: find.text('Profil erstellt'),
);
expect(badgeFor('a'), findsNothing);
expect(badgeFor('b'), findsOneWidget);
await tester.tap(find.byKey(const ValueKey('a')));
await tester.pumpAndSettle();
final profileController = Get.find<AnwendungController>();
profileController.druckController.text = '220';
profileController.druckbettController.text = '60';
storage.failWrites = true;
await profileController.saveAnwendung();
expect(home.filamentIdsMitProfil, isNot(contains('a')));
storage.failWrites = false;
await profileController.saveAnwendung();
Get.back<void>();
await tester.pumpAndSettle();
expect(badgeFor('a'), findsOneWidget);
expect(badgeFor('b'), findsOneWidget);
// Reloads after imports must also clear badges for removed profiles.
await storage.saveModelList(AnwendungController.storageKey, []);
home.loadFilamente();
await tester.pumpAndSettle();
expect(find.text('Profil erstellt'), findsNothing);
expect(tester.takeException(), isNull);
});
testWidgets(
'Multicolor part persists both filaments and matching processing profile',
(tester) async {