Merge branch 'learn-fb' into integration
This commit is contained in:
commit
918080ce46
4 changed files with 2471 additions and 368 deletions
|
|
@ -144,6 +144,37 @@ void main() {
|
|||
await show(tester);
|
||||
await tap(tester, find.text('Grant assistants'));
|
||||
expect(tester.widget<FilledButton>(saveButton()).onPressed, isNull);
|
||||
// What a grant does and how its budget counts, behind the question
|
||||
// marks beside People and Budget (decided 3 Nov 2026).
|
||||
final note = find.textContaining('They agree once');
|
||||
final counts = find.textContaining('Empty for none.');
|
||||
expect(note, findsNothing);
|
||||
expect(counts, findsNothing);
|
||||
await tap(
|
||||
tester,
|
||||
find.descendant(
|
||||
of: find.widgetWithText(ExplainedTitle, 'People'),
|
||||
matching: find.byType(HelpButton),
|
||||
),
|
||||
);
|
||||
expect(note, findsOneWidget);
|
||||
await tap(tester, find.text('OK'));
|
||||
await tester.ensureVisible(
|
||||
find.widgetWithText(ExplainedTitle, 'Budget, for all of them together'),
|
||||
);
|
||||
await tester.pumpAndSettle();
|
||||
await tap(
|
||||
tester,
|
||||
find.descendant(
|
||||
of: find.widgetWithText(
|
||||
ExplainedTitle,
|
||||
'Budget, for all of them together',
|
||||
),
|
||||
matching: find.byType(HelpButton),
|
||||
),
|
||||
);
|
||||
expect(counts, findsOneWidget);
|
||||
await tap(tester, find.text('OK'));
|
||||
|
||||
await addPerson(tester, 'anna');
|
||||
await addPerson(tester, 'ben');
|
||||
|
|
|
|||
|
|
@ -406,14 +406,16 @@ void main() {
|
|||
),
|
||||
);
|
||||
await show(tester);
|
||||
|
||||
expect(
|
||||
find.text(
|
||||
const why =
|
||||
"Whoever runs test.example.org doesn't allow own keys here, so the "
|
||||
"app doesn't ask these.",
|
||||
),
|
||||
findsOneWidget,
|
||||
);
|
||||
"app doesn't ask these.";
|
||||
|
||||
expect(find.text(why), findsNothing, reason: 'behind its question mark');
|
||||
await tester.tap(find.byType(HelpButton));
|
||||
await tester.pumpAndSettle();
|
||||
expect(find.text(why), findsOneWidget);
|
||||
await tester.tap(find.text('OK'));
|
||||
await tester.pumpAndSettle();
|
||||
expect(find.text('Add an assistant with your own key'), findsNothing);
|
||||
});
|
||||
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@ import 'dart:convert';
|
|||
import 'package:flutter_test/flutter_test.dart';
|
||||
import 'package:halkyon_app/halkyon_app.dart';
|
||||
import 'package:halkyon_app/testing.dart';
|
||||
import 'package:halkyon_ui/halkyon_ui.dart';
|
||||
import 'package:material_ui/material_ui.dart';
|
||||
|
||||
/// A signed-in person's app as a test makes one: whose it is.
|
||||
|
|
@ -592,6 +593,20 @@ void main() {
|
|||
|
||||
expect(find.text('Set up a password'), findsOneWidget);
|
||||
expect(find.text('Change password'), findsNothing);
|
||||
|
||||
// What it is, behind its question mark (decided 3 Nov 2026).
|
||||
const what =
|
||||
'Sign in with your email address, a password and an '
|
||||
'authenticator app.';
|
||||
expect(find.text(what), findsNothing);
|
||||
await tester.tap(
|
||||
find.descendant(
|
||||
of: find.widgetWithText(ExplainedTitle, 'Set up a password'),
|
||||
matching: find.byType(HelpButton),
|
||||
),
|
||||
);
|
||||
await tester.pumpAndSettle();
|
||||
expect(find.text(what), findsOneWidget);
|
||||
});
|
||||
|
||||
testWidgets('offers none to one without an address: a code mailed to '
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
import 'package:flutter_test/flutter_test.dart';
|
||||
import 'package:halkyon_app/halkyon_app.dart';
|
||||
import 'package:halkyon_app/testing.dart';
|
||||
import 'package:halkyon_ui/halkyon_ui.dart';
|
||||
import 'package:material_ui/material_ui.dart';
|
||||
|
||||
const password = 'correct horse battery';
|
||||
|
|
@ -46,10 +47,11 @@ void main() {
|
|||
|
||||
expect(find.text('SimpleLogin'), findsOneWidget);
|
||||
expect(find.widgetWithText(ListTile, 'Add SimpleLogin'), findsOneWidget);
|
||||
expect(
|
||||
find.text('Sign in with SimpleLogin, or with your Proton account.'),
|
||||
findsOneWidget,
|
||||
);
|
||||
const hint = 'Sign in with SimpleLogin, or with your Proton account.';
|
||||
expect(find.text(hint), findsNothing, reason: 'behind its question mark');
|
||||
await tester.tap(find.byType(HelpButton));
|
||||
await tester.pumpAndSettle();
|
||||
expect(find.text(hint), findsOneWidget);
|
||||
});
|
||||
|
||||
testWidgets('nothing where the instance offers no SimpleLogin', (
|
||||
|
|
|
|||
Loading…
Reference in a new issue