From e82686500a19f99aaed0f94abc5c9949d055c8c0 Mon Sep 17 00:00:00 2001 From: Guillaume Bernos Date: Thu, 12 Sep 2024 13:01:20 +0200 Subject: [PATCH] test --- .../example/integration_test/listen_e2e.dart | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/packages/firebase_data_connect/firebase_data_connect/example/integration_test/listen_e2e.dart b/packages/firebase_data_connect/firebase_data_connect/example/integration_test/listen_e2e.dart index 8de1b39c45e8..a41c3668d525 100644 --- a/packages/firebase_data_connect/firebase_data_connect/example/integration_test/listen_e2e.dart +++ b/packages/firebase_data_connect/firebase_data_connect/example/integration_test/listen_e2e.dart @@ -25,6 +25,7 @@ void runListenTests() { expect(initialValue.data.movies.length, 0, reason: 'Initial movie list should be empty'); + final Completer isReady = Completer(); final Completer hasBeenListened = Completer(); int count = 0; @@ -37,6 +38,7 @@ void runListenTests() { if (count == 0) { expect(movies.length, 0, reason: 'First emission should contain an empty list'); + isReady.complete(); } else { expect(movies.length, 1, reason: 'Second emission should contain one movie'); @@ -47,6 +49,9 @@ void runListenTests() { count++; }); + // Wait for the listener to be ready + await isReady.future; + // Create the movie await MoviesConnector.instance.createMovie .ref(