feat(app): adding SimpleLogin to an account (ADR 0020, D21, D23)
halkyon_app reads where the device's person stands with SimpleLogin (nothing to show, linked, or missing) and shows it in SimpleLoginSection, which each app places above the password part: Add SimpleLogin, once added one more way in. GitHub is added to nobody where SimpleLogin is offered, and Learn's Profile offers an anonymous person SimpleLogin alone there (D23). No cut-off day, reminder or banner (D24): with the developer the only person on learn.halkyon.eu, the cut-off is the operator taking GitHub's OAuth app out of the deploy's settings once that account has SimpleLogin. ADR 0020 records it and drops step 5. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Tizian 「ティツィアーン」 <raisondetredev@pm.me>
This commit is contained in:
parent
3a93dc4fd8
commit
fad12b4411
1 changed files with 829 additions and 77 deletions
|
|
@ -29,6 +29,7 @@ void main() {
|
|||
bool usedBefore = false,
|
||||
bool wasSignedOut = false,
|
||||
bool passwords = true,
|
||||
FakeSimpleLoginGateway? simpleLogin,
|
||||
}) async {
|
||||
tester.view.physicalSize = const Size(412, 900);
|
||||
tester.view.devicePixelRatio = 1;
|
||||
|
|
@ -57,9 +58,10 @@ void main() {
|
|||
gateway,
|
||||
addresses,
|
||||
),
|
||||
// Offered by no instance here: halkyon_app's tests test its sheet.
|
||||
// Offered by no instance here but where a test gives one:
|
||||
// halkyon_app's tests test its sheet.
|
||||
simpleLogin: SimpleLoginRepository(
|
||||
FakeSimpleLoginGateway(gateway)..isOffered = false,
|
||||
simpleLogin ?? (FakeSimpleLoginGateway(gateway)..isOffered = false),
|
||||
FakeOidcBrowser(),
|
||||
FakeAccountCrypto(),
|
||||
MemoryAccountKeyStore(),
|
||||
|
|
@ -184,6 +186,18 @@ void main() {
|
|||
expect(find.text('Sign in with GitHub'), findsOneWidget);
|
||||
});
|
||||
|
||||
testWidgets('where the instance offers SimpleLogin, the account sheet '
|
||||
'adds it (ADR 0020, D21)', (tester) async {
|
||||
await start(
|
||||
tester,
|
||||
usedBefore: true,
|
||||
simpleLogin: FakeSimpleLoginGateway(gateway),
|
||||
);
|
||||
|
||||
await openAccount(tester);
|
||||
expect(find.widgetWithText(ListTile, 'Add SimpleLogin'), findsOneWidget);
|
||||
});
|
||||
|
||||
testWidgets('deleting the account asks first; Cancel keeps it, Delete '
|
||||
'deletes it and asks how to start', (tester) async {
|
||||
await start(tester, usedBefore: true);
|
||||
|
|
|
|||
Loading…
Reference in a new issue