mirror of
https://github.com/kuhyx/todo-app.git
synced 2026-11-21 13:52:19 +01:00
Some checks failed
dependency freshness / dependencies on newest stable (push) Has been cancelled
file-length / file length <= 250 lines (push) Has been cancelled
md-naming / markdown naming convention (push) Has been cancelled
release-apk / release (APK) (push) Has been cancelled
repo-contract / repo contract (push) Has been cancelled
crdt_sync_flutter 0.9.0's installAppErrors in main(): uncaught errors and every spinner shown over 1 s (WaitWatch: sync.run, mirror.test) upload to RTDB /todo/errors/<device> with the versionCode, where the PC app-errors ingest files board tickets (kuhyx/utils DOCS-app-errors.md). The app moves to material_ui first: sync_settings_ui 0.8.x and design_system 0.4.x sit on it, and Flutter 3.50 deprecates flutter/material. Pins: crdt_sync 0.14.1, csf 0.9.0, ssui 0.8.3, gda 0.5.1, design_system 0.4.1, image 4.13.1, mcp_dart 2.4.4. file_picker stays 13.3.3, held by data_transfer_flutter 0.2.2 (allowlisted, self-clearing). appRoute takes a route name so each report names its screen; the release build passes APP_BUILD/APP_VERSION. Nothing new on screen. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
115 lines
3.4 KiB
Dart
115 lines
3.4 KiB
Dart
/// Textgate guard for the capture screen, the editor and the settings
|
|
/// screens: nothing app-written is painted, only typed content and numbers.
|
|
library;
|
|
|
|
import 'package:material_ui/material_ui.dart';
|
|
import 'package:flutter_test/flutter_test.dart';
|
|
import 'package:http/http.dart' as http;
|
|
import 'package:http/testing.dart';
|
|
import 'package:todo/data/note_template.dart';
|
|
import 'package:todo/ui/cloud_images_settings.dart';
|
|
import 'package:todo/ui/note_editor_mode.dart';
|
|
|
|
import 'capture_screen_harness.dart';
|
|
import 'github_mirror_harness.dart';
|
|
import 'note_editor_harness.dart';
|
|
import 'settings_screen_harness.dart';
|
|
import 'text_free_guard.dart';
|
|
|
|
Future<void> _frames(WidgetTester t) async {
|
|
await t.pump();
|
|
await t.pump(const Duration(milliseconds: 300));
|
|
}
|
|
|
|
void main() {
|
|
testWidgets('the capture screen paints no words', (t) async {
|
|
await pumpCapture(t);
|
|
expectNoChromeWords(t);
|
|
});
|
|
|
|
testWidgets('a saved draft paints no words', (t) async {
|
|
await pumpCapture(t);
|
|
await t.enterText(find.byType(TextField), 'Buy milk');
|
|
await _frames(t);
|
|
expectNoChromeWords(t);
|
|
});
|
|
|
|
testWidgets('sync with nothing configured paints no words', (t) async {
|
|
await pumpCapture(t);
|
|
await t.tap(find.bySemanticsLabel('Sync'));
|
|
await _frames(t);
|
|
expectNoChromeWords(t);
|
|
});
|
|
|
|
testWidgets('a failed sync paints no words', (t) async {
|
|
await pumpCapture(
|
|
t,
|
|
prefs: configuredPrefs,
|
|
httpClient: MockClient((_) async => http.Response('boom', 500)),
|
|
);
|
|
await t.tap(find.bySemanticsLabel('Sync'));
|
|
await _frames(t);
|
|
expectNoChromeWords(t, content: const ['boom']);
|
|
});
|
|
|
|
testWidgets('the guided wizard and its steps paint no words', (t) async {
|
|
await pumpCapture(t);
|
|
await t.tap(find.bySemanticsLabel('Guided'));
|
|
await t.pump();
|
|
expectNoChromeWords(t);
|
|
await t.tap(find.bySemanticsLabel('Next'));
|
|
await t.pump();
|
|
expectNoChromeWords(t);
|
|
await t.tap(find.bySemanticsLabel('Start'));
|
|
await t.pump();
|
|
expectNoChromeWords(t);
|
|
await t.tap(find.bySemanticsLabel('Next'));
|
|
await _frames(t);
|
|
expectNoChromeWords(t);
|
|
});
|
|
|
|
testWidgets('a guided step paints no words', (t) async {
|
|
await pumpEditor(t, initialTemplate: NoteTemplate.llmDesignSpec);
|
|
expectNoChromeWords(t);
|
|
});
|
|
|
|
testWidgets('the raw editor paints no words', (t) async {
|
|
await pumpEditor(t, initialMode: NoteEditorMode.raw);
|
|
expectNoChromeWords(t);
|
|
});
|
|
|
|
testWidgets('settings paint no words', (t) async {
|
|
await pumpSettings(t);
|
|
expectNoChromeWords(t);
|
|
});
|
|
|
|
testWidgets('sync settings paint no words', (t) async {
|
|
await pumpSettings(t);
|
|
await t.tap(find.bySemanticsLabel('Sync settings: Firebase'));
|
|
await _frames(t);
|
|
await _frames(t);
|
|
expectNoChromeWords(t);
|
|
});
|
|
|
|
testWidgets('GitHub sync and its test result paint no words', (t) async {
|
|
await pumpMirror(
|
|
t,
|
|
httpClient: MockClient((_) async => http.Response('{}', 404)),
|
|
);
|
|
expectNoChromeWords(t, content: const ['kuhyx', 'syncs']);
|
|
await t.tap(find.bySemanticsLabel('Test connection'));
|
|
await _frames(t);
|
|
expectNoChromeWords(t, content: const ['kuhyx', 'syncs']);
|
|
});
|
|
|
|
for (final field in [true, false]) {
|
|
testWidgets('cloud images (field: $field) paint no words', (t) async {
|
|
await t.pumpWidget(
|
|
MaterialApp(home: CloudImagesScreen(showPasswordField: field)),
|
|
);
|
|
await t.pump();
|
|
expectNoChromeWords(t);
|
|
});
|
|
}
|
|
}
|