Merge main (handover test-fix d42ed0d) into Tane rename
This commit is contained in:
commit
9913d03c7a
2 changed files with 64 additions and 2 deletions
|
|
@ -84,13 +84,21 @@ void main() {
|
|||
await tester.tap(find.byKey(const Key('handover.save')));
|
||||
await tester.pumpAndSettle();
|
||||
|
||||
final sales = await repo.watchSales().first;
|
||||
// One-shot .get() reads (NOT watch().first): a Drift stream's `.first`
|
||||
// never completes under the widget-test fake-async clock, so awaiting it
|
||||
// in a testWidgets body hangs the whole test to the 10-min hard cap. A
|
||||
// plain SELECT resolves fine (same as the movements/lot reads below).
|
||||
final sales = await (db.select(
|
||||
db.sales,
|
||||
)..where((s) => s.isDeleted.equals(false))).get();
|
||||
expect(sales.single.direction, SaleDirection.iSold);
|
||||
expect(sales.single.amount, 2.5);
|
||||
expect(sales.single.currency, 'Ğ1');
|
||||
expect(sales.single.counterparty, 'María');
|
||||
|
||||
final plantares = await repo.watchPlantares().first;
|
||||
final plantares = await (db.select(
|
||||
db.plantares,
|
||||
)..where((p) => p.isDeleted.equals(false))).get();
|
||||
expect(plantares.single.direction, PlantareDirection.owedToMe);
|
||||
expect(plantares.single.owedDescription, 'un puñado');
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue