Cloud-Account-Kontingent: App liest cloud_remaining, sobald der Server es liefert
BakaAuth bekommt verbleibend/merkeVerbleibend analog zu GastZugang. YtDownloadService liest cloud_remaining bei Cloud-Zugriff (nicht bei Gast-Zugriff — Felder bleiben getrennt). UI zeigt "Noch N von 100 heute" für angemeldete Cloud-Accounts. Reine App-Seite, wirkungslos bis der Server (separates Vorhaben) cloud_remaining liefert. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012A2pmbnVNPiHdyf2GW8eLP
This commit is contained in:
co-authored by
Claude Sonnet 5
parent
8611738124
commit
d03a4e93a0
@@ -176,6 +176,26 @@ void main() {
|
||||
await db.close();
|
||||
});
|
||||
|
||||
testWidgets('Angemeldeter Cloud-Account sieht das Kontingent nach Download',
|
||||
(tester) async {
|
||||
final db = MeloDb(NativeDatabase.memory());
|
||||
final auth = await _angemeldeteAuth();
|
||||
final search = YtSearchService(auth: auth);
|
||||
final download = YtDownloadService(auth: auth);
|
||||
|
||||
await tester.pumpWidget(_wrap(
|
||||
db: db, auth: auth, search: search, download: download));
|
||||
await tester.pumpAndSettle();
|
||||
expect(find.textContaining('von 100 heute'), findsNothing);
|
||||
|
||||
auth.merkeVerbleibend(98);
|
||||
await tester.pump();
|
||||
|
||||
expect(find.text('Noch 98 von 100 heute'), findsOneWidget);
|
||||
|
||||
await db.close();
|
||||
});
|
||||
|
||||
// Kein Widget-Test für den Download-Knopf selbst: YtDownloadService.
|
||||
// herunterladen() kombiniert Future.any mit .timeout() — dessen Timer
|
||||
// bleibt unter Flutters fake_async-Testbindung immer als "pending" stehen
|
||||
|
||||
Reference in New Issue
Block a user