Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add missing await to mockNetworkImagesFor #1365

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/src/view/broadcast/broadcast_list_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ class _BodyState extends ConsumerState<_Body> {
slivers: [
for (final section in sections)
SliverMainAxisGroup(
key: ValueKey(section),
key: ValueKey(section.$1),
slivers: [
if (Theme.of(context).platform == TargetPlatform.iOS)
CupertinoSliverNavigationBar(
Expand Down
10 changes: 5 additions & 5 deletions test/view/broadcast/broadcast_list_screen_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ final client = MockClient((request) {
void main() {
group('BroadcastListScreen', () {
testWidgets('Displays broadcast tournament screen', variant: kPlatformVariant, (tester) async {
mockNetworkImagesFor(() async {
await mockNetworkImagesFor(() async {
final app = await makeTestProviderScopeApp(
tester,
home: const BroadcastListScreen(),
Expand All @@ -62,15 +62,15 @@ void main() {

expect(find.byType(CircularProgressIndicator), findsOneWidget);

// wait for broadcast tournaments to load
// Wait for broadcast tournaments to load
await tester.pump(const Duration(milliseconds: 100));

expect(find.byType(BroadcastCard), findsAtLeast(1));
});
});

testWidgets('Scroll broadcast tournament screen', variant: kPlatformVariant, (tester) async {
mockNetworkImagesFor(() async {
await mockNetworkImagesFor(() async {
final app = await makeTestProviderScopeApp(
tester,
home: const BroadcastListScreen(),
Expand All @@ -86,10 +86,10 @@ void main() {

expect(find.byType(CircularProgressIndicator), findsOneWidget);

// wait for broadcast tournaments to load
// Wait for broadcast tournaments to load
await tester.pump(const Duration(milliseconds: 100));

await tester.scrollUntilVisible(find.text('Completed'), 100.0);
await tester.scrollUntilVisible(find.byKey(const ValueKey('past')), 100.0);
});
});
});
Expand Down
2 changes: 1 addition & 1 deletion test/view/broadcast/broadcast_round_screen_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ void main() {
testWidgets('Test overview tab with an upcoming tournament', variant: kPlatformVariant, (
tester,
) async {
mockNetworkImagesFor(() async {
await mockNetworkImagesFor(() async {
final client = MockClient((request) {
if (request.url.path == '/api/broadcast/KnP1dgul') {
return mockResponse(
Expand Down
Loading