@@ -8,6 +8,7 @@ import 'package:flutter_test/flutter_test.dart';
8
8
import 'package:http/http.dart' as http;
9
9
import 'package:zulip/api/model/model.dart' ;
10
10
import 'package:zulip/api/route/messages.dart' ;
11
+ import 'package:zulip/model/binding.dart' ;
11
12
import 'package:zulip/model/compose.dart' ;
12
13
import 'package:zulip/model/localizations.dart' ;
13
14
import 'package:zulip/model/narrow.dart' ;
@@ -464,6 +465,9 @@ void main() {
464
465
}
465
466
466
467
testWidgets ('success' , (WidgetTester tester) async {
468
+ // for #732 regression check below
469
+ testBinding.deviceInfoResult = IosDeviceInfo (systemVersion: '16.0' );
470
+
467
471
final message = eg.streamMessage ();
468
472
await setupToMessageActionSheet (tester, message: message, narrow: TopicNarrow .ofMessage (message));
469
473
final store = await testBinding.globalStore.perAccount (eg.selfAccount.id);
@@ -472,6 +476,14 @@ void main() {
472
476
await tapCopyMessageTextButton (tester);
473
477
await tester.pump (Duration .zero);
474
478
check (await Clipboard .getData ('text/plain' )).isNotNull ().text.equals ('Hello world' );
479
+
480
+ // regression check for #732
481
+ final snackbar = tester.widget <SnackBar >(find.byType (SnackBar ));
482
+ check (snackbar.behavior).equals (SnackBarBehavior .floating);
483
+ final zulipLocalizations = GlobalLocalizations .zulipLocalizations;
484
+ tester.widget (find.descendant (matchRoot: true ,
485
+ of: find.byWidget (snackbar.content),
486
+ matching: find.text (zulipLocalizations.successMessageTextCopied)));
475
487
});
476
488
477
489
testWidgets ('request has an error' , (WidgetTester tester) async {
0 commit comments