Skip to content

test(e2e): fix flaky list view tests on android - #708

Merged
russellwheatley merged 1 commit into
mainfrom
fix/flaky-list-view-e2e
Sep 23, 2026
Merged

russellwheatley merged 1 commit into
mainfrom
fix/flaky-list-view-e2e

Conversation

@demolaf

@demolaf demolaf commented Sep 23, 2026

Copy link
Copy Markdown
Member

Both tests await a Firebase stream's first event and then pump a single frame before asserting. One frame is not enough when the platform-channel callback lands late on the Android emulator runner, so the android e2e job intermittently fails with Found 0 widgets.

Changes

  • firestore_list_view_test.dart: "Allows specifying custom error handler" awaits pumpAndSettle() instead of a single pump().
  • database_list_view_test.dart: same for "By default, ignore errors".

Why pumpAndSettle does not hang

Once the error lands, isFetching goes false and the builder returns the error Text, so the animating progress indicator is gone and no frames stay scheduled. The database error-handler test above already uses pumpAndSettle() for this same pattern.

Verification

melos run analyze is clean. These need the emulator, so the real signal is the android e2e job on this PR.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request upgrades the google_sign_in dependency to version 7.1.0 and refactors GoogleProvider to use its new initialization and authentication APIs, including adding support for serverClientId. It also updates associated tests to match the new mock structures and replaces pump() with pumpAndSettle() in list view integration tests. Feedback on the changes highlights a potential null pointer exception if authenticate() returns null (e.g., when a user cancels), and suggests tracking and asserting initialization parameters to prevent silent configuration mismatches across multiple GoogleProvider instances due to the static _initialization future.

Comment thread packages/firebase_ui_oauth_google/lib/src/provider.dart
Comment thread packages/firebase_ui_oauth_google/lib/src/provider.dart
Comment thread packages/firebase_ui_oauth_google/lib/src/provider.dart
The Firestore "custom error handler" and Database "ignore errors" tests
awaited the stream's first event, then pumped a single frame before
asserting. A platform-channel callback can land a frame late when the
emulator is slow on the Android emulator runner, so the finder saw
nothing and the android e2e job failed intermittently.

pumpAndSettle matches what the neighbouring database error-handler test
already does, and both end states are static (a Text, an empty ListView)
so it settles rather than spinning on the progress indicator.
@russellwheatley
russellwheatley merged commit df0d2bc into main Sep 23, 2026
24 checks passed
@russellwheatley
russellwheatley deleted the fix/flaky-list-view-e2e branch September 23, 2026 10:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants