diff --git a/.github/workflows/integration_tests.yml b/.github/workflows/integration_tests.yml index a310bb13a..1306f81ed 100644 --- a/.github/workflows/integration_tests.yml +++ b/.github/workflows/integration_tests.yml @@ -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 }} diff --git a/.github/workflows/reusable-integration-test.yml b/.github/workflows/reusable-integration-test.yml index bd8bafd30..32a65632a 100644 --- a/.github/workflows/reusable-integration-test.yml +++ b/.github/workflows/reusable-integration-test.yml @@ -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" diff --git a/lib/src/screens/auth/auth_page.dart b/lib/src/screens/auth/auth_page.dart index df1b72b39..495328468 100644 --- a/lib/src/screens/auth/auth_page.dart +++ b/lib/src/screens/auth/auth_page.dart @@ -116,9 +116,9 @@ class AuthPagePinCodeStateImpl extends AuthPageState { /// not the best scenario, but WidgetsBinding is not behaving correctly on Android await Future.delayed(Duration(milliseconds: 50)); - await _authBar?.dismiss(); + await _removeBar(_authBar); await Future.delayed(Duration(milliseconds: 50)); - await _progressBar?.dismiss(); + await _removeBar(_progressBar); await Future.delayed(Duration(milliseconds: 50)); if (route != null) { Navigator.of(_key.currentContext!).pushReplacementNamed(route, arguments: arguments); @@ -153,6 +153,21 @@ class AuthPagePinCodeStateImpl extends AuthPageState { ); } + Future _removeBar(Flushbar? 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? bar) { WidgetsBinding.instance.addPostFrameCallback((_) async { await bar?.dismiss();