Merge pull request #3658 from cake-tech/integration-test-fixes

fix: flaky integration test runs on the CI emulator
This commit is contained in:
David Adegoke
2026-09-27 10:17:31 +01:00
committed by GitHub
3 changed files with 38 additions and 11 deletions
+17 -1
View File
@@ -17,8 +17,24 @@ concurrency:
cancel-in-progress: true
jobs:
android-integration-tests:
check-suites:
if: github.event_name == 'workflow_dispatch' || github.event.pull_request.head.repo.fork == false
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha || github.sha }}
sparse-checkout: integration_test/suites
- name: Check the branch has the test suites
run: |
if [[ ! -d integration_test/suites/tier0 ]]; then
echo "::error::This branch has no integration test suites yet, sync it with dev to run them"
exit 1
fi
android-integration-tests:
needs: check-suites
uses: ./.github/workflows/reusable-integration-test.yml
with:
ref: ${{ github.event.pull_request.head.sha || github.sha }}
@@ -288,7 +288,8 @@ jobs:
SUITE_DIR_INPUT: ${{ inputs.suite_dir }}
EXTRA_DART_DEFINES_INPUT: ${{ inputs.extra_dart_defines }}
with:
api-level: 29
api-level: 31
target: google_apis
arch: x86_64
profile: pixel_5
force-avd-creation: false
@@ -320,7 +321,8 @@ jobs:
SUITE_DIR_INPUT: ${{ inputs.suite_dir }}
EXTRA_DART_DEFINES_INPUT: ${{ inputs.extra_dart_defines }}
with:
api-level: 29
api-level: 31
target: google_apis
arch: x86_64
profile: pixel_5
force-avd-creation: false
@@ -590,9 +592,3 @@ jobs:
-H "Content-type: application/json; charset=utf-8" \
--data "$(jq -n --arg channel "$SLACK_CHANNEL" --arg ts "$thread_ts" --arg text "$passed" \
'{channel: $channel, thread_ts: $ts, text: $text}')" > /dev/null
- name: Post-test cleanup
if: always()
run: |
pkill -f emulator || echo "No emulator processes to kill"
pkill -f adb || echo "No adb processes to kill"
+17 -2
View File
@@ -116,9 +116,9 @@ class AuthPagePinCodeStateImpl extends AuthPageState<AuthPage> {
/// not the best scenario, but WidgetsBinding is not behaving correctly on Android
await Future<void>.delayed(Duration(milliseconds: 50));
await _authBar?.dismiss();
await _removeBar(_authBar);
await Future<void>.delayed(Duration(milliseconds: 50));
await _progressBar?.dismiss();
await _removeBar(_progressBar);
await Future<void>.delayed(Duration(milliseconds: 50));
if (route != null) {
Navigator.of(_key.currentContext!).pushReplacementNamed(route, arguments: arguments);
@@ -153,6 +153,21 @@ class AuthPagePinCodeStateImpl extends AuthPageState<AuthPage> {
);
}
Future<void> _removeBar(Flushbar<void>? bar) async {
final barRoute = bar?.flushbarRoute;
if (bar == null || barRoute == null || !barRoute.isActive) {
return;
}
if (bar.isShowing()) {
await bar.dismiss();
return;
}
barRoute.navigator?.removeRoute(barRoute);
}
void dismissFlushBar(Flushbar<dynamic>? bar) {
WidgetsBinding.instance.addPostFrameCallback((_) async {
await bar?.dismiss();