fix(todo): what failed on the account sheet shows on it
The sheet holds snack bars of its own (`hasSnackBars`), so a failed deletion, sign-out or reading of the account says so on it rather than behind its barrier. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Tizian 「ティツィアーン」 <raisondetredev@pm.me>
This commit is contained in:
parent
f5d8a3ca1f
commit
24ccf2a0ab
1 changed files with 29 additions and 0 deletions
|
|
@ -195,6 +195,32 @@ void main() {
|
|||
expect(find.text('Sign in with GitHub'), findsOneWidget);
|
||||
});
|
||||
|
||||
testWidgets('a deletion the instance never got says so on the account '
|
||||
'sheet, the person still signed in', (tester) async {
|
||||
await start(tester, usedBefore: true);
|
||||
await openAccount(tester);
|
||||
gateway.deletionError = Exception('No connection');
|
||||
|
||||
await tester.tap(find.text('Delete account'));
|
||||
await tester.pumpAndSettle();
|
||||
await tester.tap(find.text('Delete account').last);
|
||||
await tester.pumpAndSettle();
|
||||
|
||||
expect(
|
||||
find.descendant(
|
||||
of: find.byType(SheetScaffold),
|
||||
matching: find.widgetWithText(
|
||||
SnackBar,
|
||||
"Couldn't delete your account: the instance wasn't reached. "
|
||||
'Try again.',
|
||||
),
|
||||
),
|
||||
findsOneWidget,
|
||||
reason: 'on the sheet, not behind its barrier',
|
||||
);
|
||||
expect(gateway.status, isA<SignedIn>());
|
||||
});
|
||||
|
||||
testWidgets('About names the source of what the instance runs, which both '
|
||||
'licences ask to offer', (tester) async {
|
||||
await start(tester, usedBefore: true);
|
||||
|
|
|
|||
Loading…
Reference in a new issue