Skip to content

Commit 040db9f

Browse files
committed
Test that broadcast round screen can be loaded from a broadcast round id
1 parent 90004de commit 040db9f

File tree

1 file changed

+31
-0
lines changed

1 file changed

+31
-0
lines changed

test/view/broadcast/broadcast_round_screen_test.dart

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,37 @@ void main() {
5656
expect(find.text('Players'), findsOneWidget);
5757
});
5858

59+
testWidgets('Check that the screen can be loaded from round id', variant: kPlatformVariant, (
60+
tester,
61+
) async {
62+
final app = await makeTestProviderScopeApp(
63+
tester,
64+
home: const BroadcastRoundScreenLoading(roundId: BroadcastRoundId('S5VCwuVn')),
65+
overrides: [lichessClientProvider.overrideWith((ref) => LichessClient(client, ref))],
66+
);
67+
68+
await tester.pumpWidget(app);
69+
70+
expect(find.byType(CircularProgressIndicator), findsOneWidget);
71+
72+
// Load the broadcast data
73+
await tester.pump();
74+
75+
expect(find.byType(CircularProgressIndicator), findsOneWidget);
76+
77+
// Load the tournament data
78+
await tester.pump();
79+
80+
expect(find.byType(CircularProgressIndicator), findsOneWidget);
81+
82+
// Load the round data
83+
await tester.pump();
84+
85+
expect(find.text('Overview'), findsOneWidget);
86+
expect(find.text('Boards'), findsOneWidget);
87+
expect(find.text('Players'), findsOneWidget);
88+
});
89+
5990
testWidgets('Test boards tab with a finished tournament', variant: kPlatformVariant, (
6091
tester,
6192
) async {

0 commit comments

Comments
 (0)