|
1 | 1 | import 'package:checks/checks.dart';
|
2 | 2 | import 'package:flutter/material.dart';
|
3 |
| -import 'package:flutter_gen/gen_l10n/zulip_localizations.dart'; |
4 | 3 | import 'package:flutter_test/flutter_test.dart';
|
5 | 4 | import 'package:zulip/api/model/model.dart';
|
6 | 5 | import 'package:zulip/api/route/messages.dart';
|
7 | 6 | import 'package:zulip/model/compose.dart';
|
8 | 7 | import 'package:zulip/model/narrow.dart';
|
9 | 8 | import 'package:zulip/model/store.dart';
|
| 9 | +import 'package:zulip/widgets/app.dart'; |
10 | 10 | import 'package:zulip/widgets/message_list.dart';
|
11 |
| -import 'package:zulip/widgets/store.dart'; |
12 |
| -import 'package:zulip/widgets/theme.dart'; |
13 | 11 |
|
14 | 12 | import '../api/fake_api.dart';
|
15 | 13 | import '../example_data.dart' as eg;
|
@@ -49,19 +47,14 @@ Future<Finder> setupToComposeInput(WidgetTester tester, {
|
49 | 47 |
|
50 | 48 | prepareBoringImageHttpClient();
|
51 | 49 |
|
52 |
| - await tester.pumpWidget(Builder(builder: (context) => |
53 |
| - MaterialApp( |
54 |
| - theme: zulipThemeData(context), |
55 |
| - localizationsDelegates: ZulipLocalizations.localizationsDelegates, |
56 |
| - supportedLocales: ZulipLocalizations.supportedLocales, |
57 |
| - home: GlobalStoreWidget( |
58 |
| - child: PerAccountStoreWidget( |
59 |
| - accountId: eg.selfAccount.id, |
60 |
| - child: MessageListPage( |
61 |
| - narrow: DmNarrow( |
62 |
| - allRecipientIds: [eg.selfUser.userId, eg.otherUser.userId], |
63 |
| - selfUserId: eg.selfUser.userId, |
64 |
| - ))))))); |
| 50 | + await tester.pumpWidget(const ZulipApp()); |
| 51 | + await tester.pump(); |
| 52 | + final navigator = await ZulipApp.navigator; |
| 53 | + navigator.push(MessageListPage.buildRoute(accountId: eg.selfAccount.id, |
| 54 | + narrow: DmNarrow( |
| 55 | + allRecipientIds: [eg.selfUser.userId, eg.otherUser.userId], |
| 56 | + selfUserId: eg.selfUser.userId, |
| 57 | + ))); |
65 | 58 |
|
66 | 59 | // global store, per-account store, and message list get loaded
|
67 | 60 | await tester.pumpAndSettle();
|
|
0 commit comments