mirror of
https://github.com/kuhyx/wake-alarm.git
synced 2026-11-20 13:12:23 +01:00
Some checks are pending
dependency freshness / dependencies on newest stable (push) Waiting to run
md-naming / markdown naming convention (push) Waiting to run
pre-commit / pre-commit (${{ matrix.group }}) (mypy, mypy, ) (push) Waiting to run
pre-commit / pre-commit (${{ matrix.group }}) (pylint, pylint, ) (push) Waiting to run
pre-commit / pre-commit (${{ matrix.group }}) (rest, , mypy,pylint,free-days-interop) (push) Waiting to run
Tests / test (push) Waiting to run
Tests / free-days-interop (push) Waiting to run
release-apk / release (APK) (push) Waiting to run
repo-contract / repo contract (push) Waiting to run
Flutter 3.50 deprecates package:flutter/material.dart, so the app moves to material_ui 1.11.0 together with sync_settings_ui 0.8.0 and github_device_auth 0.5.0 (crdt_sync 0.13.1 rides along). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
47 lines
1.5 KiB
Dart
47 lines
1.5 KiB
Dart
import 'package:flutter_test/flutter_test.dart';
|
|
import 'package:material_ui/material_ui.dart';
|
|
import 'package:sync_settings_ui/sync_settings_ui.dart';
|
|
import 'package:wake_alarm_sync/ui/theme.dart';
|
|
|
|
import 'text_free_support.dart';
|
|
|
|
/// The Settings sync row opens the shared `sync_settings_ui` screen; it is
|
|
/// part of what kuhy sees, so the textgate guard covers it too.
|
|
Widget _syncScreen({required bool googleAvailable}) => MaterialApp(
|
|
theme: buildAppTheme(),
|
|
home: SyncSettingsScreen(
|
|
accountLoader: () async => null,
|
|
accountSaver: (_) async {},
|
|
accountClearer: () async {},
|
|
sessionProbe: () async => false,
|
|
firebaseFactory: () async => null,
|
|
googleFirebaseFactory: () async => null,
|
|
googleAvailable: googleAvailable,
|
|
),
|
|
);
|
|
|
|
void main() {
|
|
for (final google in [true, false]) {
|
|
testWidgets('SyncSettingsScreen (google: $google) has no words', (
|
|
tester,
|
|
) async {
|
|
phoneView(tester);
|
|
await tester.pumpWidget(_syncScreen(googleAvailable: google));
|
|
await tester.pumpAndSettle();
|
|
expectNoWords(tester, 'SyncSettingsScreen');
|
|
});
|
|
}
|
|
|
|
testWidgets('SyncSettingsScreen expanded password form has no words', (
|
|
tester,
|
|
) async {
|
|
phoneView(tester);
|
|
await tester.pumpWidget(_syncScreen(googleAvailable: false));
|
|
await tester.pumpAndSettle();
|
|
await tester.tap(find.byType(ExpansionTile));
|
|
await tester.pumpAndSettle();
|
|
expect(find.byType(TextField), findsWidgets);
|
|
expectNoWords(tester, 'SyncSettingsScreen-expanded');
|
|
});
|
|
}
|