fix: alot

This commit is contained in:
2026-10-19 21:41:34 +02:00
parent 30dd74af90
commit b0074aeb3f
40 changed files with 1979 additions and 405 deletions
+17
View File
@@ -565,5 +565,22 @@ void main() {
expect(closedTabs.last.customerName, 'First');
});
});
group('hidden products', () {
test('a tab holding a deleted product can still be changed', () async {
final tab = await service.createTab(customerName: 'John');
await service.addProductToTab(
tabId: tab.id,
product: createTestProduct(),
);
await DriftProductService(database: database).deleteProduct('prod-1');
final item = (await service.getTabById(tab.id))!.items.single;
await service.adjustTabItemQuantity(tabItemId: item.id, delta: -1);
await service.deleteTab(tab.id);
expect(await service.getTabById(tab.id), isNull);
});
});
});
}