mirror of
https://github.com/kuhyx/wake-alarm.git
synced 2026-11-29 14:43:25 +01:00
Expect material_ui's AlertDialog in E2E test
crdt_sync_flutter 0.8.2 imports material_ui, so the passphrase dialog
is material_ui's AlertDialog, not the framework one. The test still
asserted the framework type and failed on a clean checkout of
7a3b767. It now checks the type the dialog really is.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WzxdWWfb63jncj9Lca2jeX
This commit is contained in:
parent
59a853839c
commit
5937e22131
@ -1,13 +1,11 @@
|
|||||||
// ignore: deprecated_member_use, the dialog under test is framework material.
|
|
||||||
import 'package:flutter/material.dart' as fw show AlertDialog;
|
|
||||||
import 'package:flutter_test/flutter_test.dart';
|
import 'package:flutter_test/flutter_test.dart';
|
||||||
import 'package:material_ui/material_ui.dart';
|
import 'package:material_ui/material_ui.dart';
|
||||||
import 'package:wake_alarm_sync/main.dart';
|
import 'package:wake_alarm_sync/main.dart';
|
||||||
import 'package:wake_alarm_sync/screens/settings_screen.dart';
|
import 'package:wake_alarm_sync/screens/settings_screen.dart';
|
||||||
|
|
||||||
/// crdt_sync_flutter's passphrase dialog uses the framework's material
|
/// crdt_sync_flutter's passphrase dialog (0.8.2 imports material_ui, so it is
|
||||||
/// `showDialog`, which needs the framework's MaterialLocalizations. The
|
/// material_ui's `AlertDialog`) must open from the settings lock icon without
|
||||||
/// app's MaterialApp comes from material_ui and does not supply them.
|
/// a localization exception.
|
||||||
void main() {
|
void main() {
|
||||||
testWidgets('the settings lock icon opens the passphrase dialog', (
|
testWidgets('the settings lock icon opens the passphrase dialog', (
|
||||||
tester,
|
tester,
|
||||||
@ -22,7 +20,7 @@ void main() {
|
|||||||
await tester.pumpAndSettle();
|
await tester.pumpAndSettle();
|
||||||
|
|
||||||
expect(tester.takeException(), isNull);
|
expect(tester.takeException(), isNull);
|
||||||
expect(find.byType(fw.AlertDialog), findsOneWidget);
|
expect(find.byType(AlertDialog), findsOneWidget);
|
||||||
expect(find.byType(EditableText), findsOneWidget);
|
expect(find.byType(EditableText), findsOneWidget);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user