diff --git a/.github/workflows/test-android-device.yaml b/.github/workflows/test-android-device.yaml index 2902955c5..4996a5724 100644 --- a/.github/workflows/test-android-device.yaml +++ b/.github/workflows/test-android-device.yaml @@ -3,7 +3,7 @@ name: test android device on: workflow_dispatch: schedule: - - cron: '30 21 * * *' + - cron: '0 */12 * * *' jobs: run_tests: @@ -93,7 +93,10 @@ jobs: echo "EXCLUDED_TESTS=$target_paths" >> "$GITHUB_ENV" - name: patrol build android - run: patrol build android --exclude ${{ env.EXCLUDED_TESTS }} --verbose + run: | + patrol build android --exclude ${{ env.EXCLUDED_TESTS }} \ + --dart-define-from-file=defines_1.json --dart-define-from-file=defines_2.json --dart-define-from-file=defines_3.env \ + --verbose - name: Upload APKs to Firebase Test Lab and wait for tests to finish id: tests_step diff --git a/.github/workflows/test-android-emulator.yaml b/.github/workflows/test-android-emulator.yaml index dcc45e9bb..acdcda7ce 100644 --- a/.github/workflows/test-android-emulator.yaml +++ b/.github/workflows/test-android-emulator.yaml @@ -96,7 +96,10 @@ jobs: echo "EXCLUDED_TESTS=$target_paths" >> "$GITHUB_ENV" - name: patrol build android - run: patrol build android --exclude ${{ env.EXCLUDED_TESTS }} --verbose + run: | + patrol build android --exclude ${{ env.EXCLUDED_TESTS }} \ + --dart-define-from-file=defines_1.json --dart-define-from-file=defines_2.json --dart-define-from-file=defines_3.env \ + --verbose - name: Upload APKs to emulator.wtf and wait for tests to finish id: tests_step diff --git a/.github/workflows/test-ios-simulator.yaml b/.github/workflows/test-ios-simulator.yaml index 58b90a662..901468be7 100644 --- a/.github/workflows/test-ios-simulator.yaml +++ b/.github/workflows/test-ios-simulator.yaml @@ -13,7 +13,7 @@ concurrency: jobs: run_tests: name: Flutter ${{ matrix.flutter-version }} on ${{ matrix.device_model }} (${{ matrix.os_version }}) simulator - runs-on: macos-14 + runs-on: macos-latest timeout-minutes: 40 outputs: SLACK_MESSAGE_TITLE: Flutter ${{ matrix.flutter-version }} on ${{ matrix.os }} ${{ matrix.os_version }} simulator diff --git a/dev/e2e_app/integration_test/permissions/permissions_location_test.dart b/dev/e2e_app/integration_test/permissions/permissions_location_test.dart index 3fc269044..c92030e32 100644 --- a/dev/e2e_app/integration_test/permissions/permissions_location_test.dart +++ b/dev/e2e_app/integration_test/permissions/permissions_location_test.dart @@ -9,6 +9,8 @@ const _timeout = Duration(seconds: 5); // to avoid timeouts on CI // Firebase Test Lab pops out another dialog we need to handle Future tapOkIfGoogleDialogAppears(PatrolIntegrationTester $) async { + await $.pump(Duration(seconds: 10)); + var listWithOkText = []; final inactivityTimer = Timer(Duration(seconds: 10), () {}); @@ -63,7 +65,6 @@ void main() { await $.native.selectFineLocation(); await $.native.grantPermissionOnlyThisTime(); } - await $.pump(); await tapOkIfGoogleDialogAppears($); } @@ -87,8 +88,6 @@ void main() { await $.native2.selectFineLocation(); await $.native2.grantPermissionOnlyThisTime(); } - await $.pump(); - await tapOkIfGoogleDialogAppearsV2($); } diff --git a/dev/e2e_app/integration_test/webview_hackernews_test.dart b/dev/e2e_app/integration_test/webview_hackernews_test.dart index 22f94ee48..6af4216a8 100644 --- a/dev/e2e_app/integration_test/webview_hackernews_test.dart +++ b/dev/e2e_app/integration_test/webview_hackernews_test.dart @@ -6,6 +6,8 @@ void main() { await $('Open webview (Hacker News)').scrollTo().tap(); + await Future.delayed(const Duration(seconds: 3)); + await $.native.tap(Selector(text: 'login')); await $.native.enterTextByIndex( 'test@leancode.pl', @@ -24,6 +26,8 @@ void main() { await $('Open webview (Hacker News)').scrollTo().tap(); + await Future.delayed(const Duration(seconds: 3)); + await $.native2.tap( NativeSelector( android: AndroidSelector(text: 'login'), diff --git a/dev/e2e_app/integration_test/webview_leancode_test.dart b/dev/e2e_app/integration_test/webview_leancode_test.dart index 97ee1f397..d328f23ff 100644 --- a/dev/e2e_app/integration_test/webview_leancode_test.dart +++ b/dev/e2e_app/integration_test/webview_leancode_test.dart @@ -5,12 +5,14 @@ void main() { await createApp($); await $('Open webview (LeanCode)').scrollTo().tap(); + await $.pump(Duration(seconds: 8)); try { await $.native.tap(Selector(text: 'Accept cookies')); } on PatrolActionException catch (_) { // ignore } + await $.pumpAndSettle(); await $.native.enterTextByIndex( 'test@leancode.pl', @@ -24,6 +26,8 @@ void main() { await createApp($); await $('Open webview (LeanCode)').scrollTo().tap(); + await $.pump(Duration(seconds: 8)); + await $.pumpAndSettle(); try { await $.native2.tap( @@ -35,6 +39,7 @@ void main() { } on PatrolActionException catch (_) { // ignore } + await $.pumpAndSettle(); await $.native2.enterTextByIndex( 'test@leancode.pl', diff --git a/dev/e2e_app/integration_test/webview_stackoverflow_test.dart b/dev/e2e_app/integration_test/webview_stackoverflow_test.dart index e083555e7..e6ae94f62 100644 --- a/dev/e2e_app/integration_test/webview_stackoverflow_test.dart +++ b/dev/e2e_app/integration_test/webview_stackoverflow_test.dart @@ -25,7 +25,7 @@ void main() { ); patrol( - 'interacts with the StackOverflow website in a webview', + 'interacts with the StackOverflow website in a webview native2', ($) async { await createApp($);