polish(detail): TODO review — calendar intro, drop abundance, collapse seed-saving
From the owner's TODO.org review of the shipped features: - Crop calendar now says the months are YOUR notes: a hint line in the editor (cropCalendar.editorHint) and a caption under the 'this month' screen (calendar.selfNote) — it read as if the app knew when to sow. - Dropped the 'how much I have' (abundance) input + display: it competed with the lot quantity as a second 'how much'. Removed from the lot sheet and the lot summary; the DB column + backup/CSV/catalog plumbing stay dormant (no destructive migration). offer_status carries 'do I share'. - Seed-saving guidance moved into a collapsed expander (detail.seedSaving) — reference facts about the species shouldn't sit open among the grower's own records; opt-in depth, per progressive disclosure. - Condition checks already live behind the collapsed 'advanced' expander (seed lots only) — left as the discreet power-user surface. Tests: dropped the obsolete abundance→share nudge test; the seed-saving section test now expands before asserting. analyze clean; suites green.
This commit is contained in:
parent
00db9d4b6a
commit
6898e385e8
13 changed files with 73 additions and 124 deletions
|
|
@ -1,3 +1,4 @@
|
|||
import 'package:flutter/widgets.dart';
|
||||
import 'package:flutter_test/flutter_test.dart';
|
||||
import 'package:tane/data/seed_saving_catalog.dart';
|
||||
import 'package:tane/db/database.dart';
|
||||
|
|
@ -36,7 +37,14 @@ void main() {
|
|||
testWidgets('shows the seed-saving section for a known family', (tester) async {
|
||||
await pumpDetailFor(tester, 'Solanaceae');
|
||||
|
||||
// The section is a collapsed expander — its title shows, its body doesn't
|
||||
// until opened.
|
||||
expect(find.text('Saving its seed'), findsOneWidget);
|
||||
expect(find.textContaining('Self-pollinating'), findsNothing);
|
||||
|
||||
await tester.tap(find.byKey(const Key('detail.seedSaving')));
|
||||
await tester.pumpAndSettle();
|
||||
|
||||
// The pollination line is a Text.rich (label + value), so match the run.
|
||||
expect(find.textContaining('Self-pollinating'), findsOneWidget);
|
||||
expect(find.text('Easy'), findsOneWidget); // the difficulty pill
|
||||
|
|
|
|||
|
|
@ -47,40 +47,6 @@ void main() {
|
|||
await disposeTree(tester);
|
||||
});
|
||||
|
||||
testWidgets('declaring plenty reveals the share choice with a nudge', (
|
||||
tester,
|
||||
) async {
|
||||
final repo = newTestRepository(db);
|
||||
final id = await repo.addQuickVariety(label: 'Maize');
|
||||
|
||||
await tester.pumpWidget(
|
||||
wrapDetail(
|
||||
repository: repo,
|
||||
varietyId: id,
|
||||
species: newTestSpeciesRepository(db),
|
||||
),
|
||||
);
|
||||
await tester.pumpAndSettle();
|
||||
|
||||
await tester.tap(find.byKey(const Key('detail.addLot')));
|
||||
await tester.pumpAndSettle();
|
||||
|
||||
// Reveal abundance and declare plenty.
|
||||
await tester.ensureVisible(find.byKey(const Key('lot.addAbundance')));
|
||||
await tester.tap(find.byKey(const Key('lot.addAbundance')));
|
||||
await tester.pumpAndSettle();
|
||||
await tester.ensureVisible(
|
||||
find.byKey(const Key('abundance.plentyToShare')),
|
||||
);
|
||||
await tester.tap(find.byKey(const Key('abundance.plentyToShare')));
|
||||
await tester.pumpAndSettle();
|
||||
|
||||
// The share section reveals itself, still private, with a soft nudge.
|
||||
expect(find.byKey(const Key('share.private')), findsOneWidget);
|
||||
expect(find.byKey(const Key('share.nudge')), findsOneWidget);
|
||||
await disposeTree(tester);
|
||||
});
|
||||
|
||||
testWidgets('the sharing filter narrows the list to what I share', (
|
||||
tester,
|
||||
) async {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue