Show the saved Cyr2Lat profile again after a failed save
This commit is contained in:
1 parent
fc5f7eb516
commit
df7c3efa4a
2 files changed
+31
-2
No files matched your search
@@ -260,6 +260,27 @@ void main() {
|
||||
expect(find.text(_l10n.chatCompression_label('SMAZ')), findsOneWidget);
|
||||
});
|
||||
|
||||
testWidgets('a failed profile save shows the saved profile again', (
|
||||
tester,
|
||||
) async {
|
||||
await pumpHost(tester, mode: ChatCompressionMode.cyr2lat, profileId: 'ru');
|
||||
await openSheet(tester);
|
||||
|
||||
await tester.ensureVisible(find.text('Russian'));
|
||||
await tester.pumpAndSettle();
|
||||
await tester.tap(find.text('Russian'));
|
||||
await tester.pumpAndSettle();
|
||||
await tester.tap(find.text('Serbian').last);
|
||||
await tester.pump();
|
||||
expect(profileCalls, ['sr']);
|
||||
pending.single.completeError(StateError('disk full'));
|
||||
await tester.pumpAndSettle();
|
||||
|
||||
expect(find.text(_l10n.chatCompression_saveFailed), findsOneWidget);
|
||||
expect(find.text('Russian'), findsOneWidget);
|
||||
expect(find.text('Serbian'), findsNothing);
|
||||
});
|
||||
|
||||
testWidgets('disabled shows the saved mode, and the sheet says why and '
|
||||
'allows no change', (tester) async {
|
||||
final semantics = tester.ensureSemantics();
|
||||
|
||||
Reference in new issue
Block a user