diff --git a/.github/workflows/analyze-test.yaml b/.github/workflows/analyze-test.yaml index 199df6f10b..687c0d4020 100644 --- a/.github/workflows/analyze-test.yaml +++ b/.github/workflows/analyze-test.yaml @@ -9,7 +9,7 @@ on: name: Analyze and test env: - FLUTTER_VERSION: 3.32.8 + FLUTTER_VERSION: 3.38.9 jobs: analyze-test: diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index d32d939aba..23d9d36768 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -6,7 +6,7 @@ on: name: Build dev binaries env: - FLUTTER_VERSION: 3.32.8 + FLUTTER_VERSION: 3.38.9 XCODE_VERSION: 16.0 jobs: diff --git a/.github/workflows/gh-pages.yaml b/.github/workflows/gh-pages.yaml index b00085d004..87578458a6 100644 --- a/.github/workflows/gh-pages.yaml +++ b/.github/workflows/gh-pages.yaml @@ -6,7 +6,7 @@ on: name: Deploy PR on Github Pages env: - FLUTTER_VERSION: 3.32.8 + FLUTTER_VERSION: 3.38.9 concurrency: group: ${{ github.workflow }}-${{ github.ref }} diff --git a/.github/workflows/image-sentry.yaml b/.github/workflows/image-sentry.yaml index 5fa20eae72..7ad174f068 100644 --- a/.github/workflows/image-sentry.yaml +++ b/.github/workflows/image-sentry.yaml @@ -69,7 +69,7 @@ jobs: cache-to: | type=gha build-args: | - FLUTTER_VERSION=3.32.8 + FLUTTER_VERSION=3.38.9 SENTRY_AUTH_TOKEN=${{ secrets.SENTRY_AUTH_TOKEN }} SENTRY_ORG=${{ secrets.SENTRY_ORG }} SENTRY_PROJECT=${{ secrets.SENTRY_PROJECT }} diff --git a/.github/workflows/patrol-integration-test.yaml b/.github/workflows/patrol-integration-test.yaml index e9a89f7440..d28ad4098c 100644 --- a/.github/workflows/patrol-integration-test.yaml +++ b/.github/workflows/patrol-integration-test.yaml @@ -7,7 +7,7 @@ on: env: JAVA_VERSION: 17 - FLUTTER_VERSION: 3.32.8 + FLUTTER_VERSION: 3.38.9 jobs: mobile_integration_test: diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 638e232173..d79ca4079e 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -6,7 +6,7 @@ on: name: Release env: - FLUTTER_VERSION: 3.32.8 + FLUTTER_VERSION: 3.38.9 XCODE_VERSION: 16.0 jobs: diff --git a/Dockerfile b/Dockerfile index 1eb78d5fc2..987bd6860e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -ARG FLUTTER_VERSION=3.32.8 +ARG FLUTTER_VERSION=3.38.9 FROM --platform=amd64 ghcr.io/instrumentisto/flutter:${FLUTTER_VERSION} AS build-env diff --git a/android/app/build.gradle b/android/app/build.gradle index d51c3d681a..923a3a357e 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -24,7 +24,7 @@ if (flutterVersionName == null) { def flutterMinSdkVersion = localProperties.getProperty('flutter.minSdkVersion') if (flutterMinSdkVersion == null) { - flutterMinSdkVersion = '21' + flutterMinSdkVersion = '23' } def keystoreProperties = new Properties() diff --git a/contact/pubspec.lock b/contact/pubspec.lock index ff2230f1d2..83a56658ae 100644 --- a/contact/pubspec.lock +++ b/contact/pubspec.lock @@ -732,26 +732,26 @@ packages: dependency: transitive description: name: leak_tracker - sha256: "6bb818ecbdffe216e81182c2f0714a2e62b593f4a4f13098713ff1685dfb6ab0" + sha256: "33e2e26bdd85a0112ec15400c8cbffea70d0f9c3407491f672a2fad47915e2de" url: "https://pub.dev" source: hosted - version: "10.0.9" + version: "11.0.2" leak_tracker_flutter_testing: dependency: transitive description: name: leak_tracker_flutter_testing - sha256: f8b613e7e6a13ec79cfdc0e97638fddb3ab848452eff057653abd3edba760573 + sha256: "1dbc140bb5a23c75ea9c4811222756104fbcd1a27173f0c34ca01e16bea473c1" url: "https://pub.dev" source: hosted - version: "3.0.9" + version: "3.0.10" leak_tracker_testing: dependency: transitive description: name: leak_tracker_testing - sha256: "6ba465d5d76e67ddf503e1161d1f4a6bc42306f9d66ca1e8f079a47290fb06d3" + sha256: "8d5a2d49f4a66b49744b23b018848400d23e54caf9463f4eb20df3eb8acb2eb1" url: "https://pub.dev" source: hosted - version: "3.0.1" + version: "3.0.2" linkify: dependency: transitive description: @@ -796,10 +796,10 @@ packages: dependency: transitive description: name: meta - sha256: e3641ec5d63ebf0d9b41bd43201a66e3fc79a65db5f61fc181f04cd27aab950c + sha256: "23f08335362185a5ea2ad3a4e597f1375e78bce8a040df5c600c8d3552ef2394" url: "https://pub.dev" source: hosted - version: "1.16.0" + version: "1.17.0" mime: dependency: transitive description: @@ -1177,10 +1177,10 @@ packages: dependency: transitive description: name: test_api - sha256: fb31f383e2ee25fbbfe06b40fe21e1e458d14080e3c67e7ba0acfde4df4e0bbd + sha256: ab2726c1a94d3176a45960b6234466ec367179b87dd74f1611adb1f3b5fb9d55 url: "https://pub.dev" source: hosted - version: "0.7.4" + version: "0.7.7" timing: dependency: transitive description: @@ -1321,10 +1321,10 @@ packages: dependency: transitive description: name: vector_math - sha256: "80b3257d1492ce4d091729e3a67a60407d227c27241d6927be0130c98e741803" + sha256: d530bd74fea330e6e364cda7a85019c434070188383e1cd8d9777ee586914c5b url: "https://pub.dev" source: hosted - version: "2.1.4" + version: "2.2.0" vm_service: dependency: transitive description: @@ -1398,5 +1398,5 @@ packages: source: hosted version: "3.1.2" sdks: - dart: ">=3.7.0-0 <4.0.0" + dart: ">=3.8.0-0 <4.0.0" flutter: ">=3.27.0" diff --git a/core/lib/presentation/utils/theme_utils.dart b/core/lib/presentation/utils/theme_utils.dart index ad685fcfcb..2aa9927bcf 100644 --- a/core/lib/presentation/utils/theme_utils.dart +++ b/core/lib/presentation/utils/theme_utils.dart @@ -332,7 +332,7 @@ class ThemeUtils { } static final AppBarTheme _appBarTheme = AppBarTheme( - color: Colors.white, + backgroundColor: Colors.white, elevation: 0, systemOverlayStyle: SystemUiOverlayStyle.light, iconTheme: const IconThemeData(color: Colors.black), diff --git a/core/lib/presentation/views/html_viewer/html_content_viewer_widget.dart b/core/lib/presentation/views/html_viewer/html_content_viewer_widget.dart index 9e682ccb54..bc185e4f77 100644 --- a/core/lib/presentation/views/html_viewer/html_content_viewer_widget.dart +++ b/core/lib/presentation/views/html_viewer/html_content_viewer_widget.dart @@ -85,7 +85,6 @@ class HtmlContentViewState extends State with AutomaticKeepAl String? _htmlData; - @visibleForTesting InAppWebViewController get webViewController => _webViewController; @override diff --git a/core/pubspec.lock b/core/pubspec.lock index 3657388b8e..f7f5c67b4f 100644 --- a/core/pubspec.lock +++ b/core/pubspec.lock @@ -700,26 +700,26 @@ packages: dependency: transitive description: name: leak_tracker - sha256: "6bb818ecbdffe216e81182c2f0714a2e62b593f4a4f13098713ff1685dfb6ab0" + sha256: "33e2e26bdd85a0112ec15400c8cbffea70d0f9c3407491f672a2fad47915e2de" url: "https://pub.dev" source: hosted - version: "10.0.9" + version: "11.0.2" leak_tracker_flutter_testing: dependency: transitive description: name: leak_tracker_flutter_testing - sha256: f8b613e7e6a13ec79cfdc0e97638fddb3ab848452eff057653abd3edba760573 + sha256: "1dbc140bb5a23c75ea9c4811222756104fbcd1a27173f0c34ca01e16bea473c1" url: "https://pub.dev" source: hosted - version: "3.0.9" + version: "3.0.10" leak_tracker_testing: dependency: transitive description: name: leak_tracker_testing - sha256: "6ba465d5d76e67ddf503e1161d1f4a6bc42306f9d66ca1e8f079a47290fb06d3" + sha256: "8d5a2d49f4a66b49744b23b018848400d23e54caf9463f4eb20df3eb8acb2eb1" url: "https://pub.dev" source: hosted - version: "3.0.1" + version: "3.0.2" linkify: dependency: "direct main" description: @@ -764,10 +764,10 @@ packages: dependency: transitive description: name: meta - sha256: e3641ec5d63ebf0d9b41bd43201a66e3fc79a65db5f61fc181f04cd27aab950c + sha256: "23f08335362185a5ea2ad3a4e597f1375e78bce8a040df5c600c8d3552ef2394" url: "https://pub.dev" source: hosted - version: "1.16.0" + version: "1.17.0" mime: dependency: transitive description: @@ -1122,10 +1122,10 @@ packages: dependency: transitive description: name: test_api - sha256: fb31f383e2ee25fbbfe06b40fe21e1e458d14080e3c67e7ba0acfde4df4e0bbd + sha256: ab2726c1a94d3176a45960b6234466ec367179b87dd74f1611adb1f3b5fb9d55 url: "https://pub.dev" source: hosted - version: "0.7.4" + version: "0.7.7" timing: dependency: transitive description: @@ -1258,10 +1258,10 @@ packages: dependency: transitive description: name: vector_math - sha256: "80b3257d1492ce4d091729e3a67a60407d227c27241d6927be0130c98e741803" + sha256: d530bd74fea330e6e364cda7a85019c434070188383e1cd8d9777ee586914c5b url: "https://pub.dev" source: hosted - version: "2.1.4" + version: "2.2.0" vm_service: dependency: transitive description: @@ -1335,5 +1335,5 @@ packages: source: hosted version: "3.1.2" sdks: - dart: ">=3.7.0-0 <4.0.0" + dart: ">=3.8.0-0 <4.0.0" flutter: ">=3.27.0" diff --git a/cozy/pubspec.lock b/cozy/pubspec.lock index 3fd5249570..bfbdc3d51c 100644 --- a/cozy/pubspec.lock +++ b/cozy/pubspec.lock @@ -172,26 +172,26 @@ packages: dependency: transitive description: name: leak_tracker - sha256: "6bb818ecbdffe216e81182c2f0714a2e62b593f4a4f13098713ff1685dfb6ab0" + sha256: "33e2e26bdd85a0112ec15400c8cbffea70d0f9c3407491f672a2fad47915e2de" url: "https://pub.dev" source: hosted - version: "10.0.9" + version: "11.0.2" leak_tracker_flutter_testing: dependency: transitive description: name: leak_tracker_flutter_testing - sha256: f8b613e7e6a13ec79cfdc0e97638fddb3ab848452eff057653abd3edba760573 + sha256: "1dbc140bb5a23c75ea9c4811222756104fbcd1a27173f0c34ca01e16bea473c1" url: "https://pub.dev" source: hosted - version: "3.0.9" + version: "3.0.10" leak_tracker_testing: dependency: transitive description: name: leak_tracker_testing - sha256: "6ba465d5d76e67ddf503e1161d1f4a6bc42306f9d66ca1e8f079a47290fb06d3" + sha256: "8d5a2d49f4a66b49744b23b018848400d23e54caf9463f4eb20df3eb8acb2eb1" url: "https://pub.dev" source: hosted - version: "3.0.1" + version: "3.0.2" linagora_design_flutter: dependency: "direct main" description: @@ -229,10 +229,10 @@ packages: dependency: transitive description: name: meta - sha256: e3641ec5d63ebf0d9b41bd43201a66e3fc79a65db5f61fc181f04cd27aab950c + sha256: "23f08335362185a5ea2ad3a4e597f1375e78bce8a040df5c600c8d3552ef2394" url: "https://pub.dev" source: hosted - version: "1.16.0" + version: "1.17.0" path: dependency: transitive description: @@ -378,10 +378,10 @@ packages: dependency: transitive description: name: test_api - sha256: fb31f383e2ee25fbbfe06b40fe21e1e458d14080e3c67e7ba0acfde4df4e0bbd + sha256: ab2726c1a94d3176a45960b6234466ec367179b87dd74f1611adb1f3b5fb9d55 url: "https://pub.dev" source: hosted - version: "0.7.4" + version: "0.7.7" typed_data: dependency: transitive description: @@ -418,10 +418,10 @@ packages: dependency: transitive description: name: vector_math - sha256: "80b3257d1492ce4d091729e3a67a60407d227c27241d6927be0130c98e741803" + sha256: d530bd74fea330e6e364cda7a85019c434070188383e1cd8d9777ee586914c5b url: "https://pub.dev" source: hosted - version: "2.1.4" + version: "2.2.0" vm_service: dependency: transitive description: @@ -447,5 +447,5 @@ packages: source: hosted version: "6.5.0" sdks: - dart: ">=3.7.0-0 <4.0.0" + dart: ">=3.8.0-0 <4.0.0" flutter: ">=3.27.0" diff --git a/email_recovery/pubspec.lock b/email_recovery/pubspec.lock index 482e7ec429..bbe69aa774 100644 --- a/email_recovery/pubspec.lock +++ b/email_recovery/pubspec.lock @@ -328,26 +328,26 @@ packages: dependency: transitive description: name: leak_tracker - sha256: "6bb818ecbdffe216e81182c2f0714a2e62b593f4a4f13098713ff1685dfb6ab0" + sha256: "33e2e26bdd85a0112ec15400c8cbffea70d0f9c3407491f672a2fad47915e2de" url: "https://pub.dev" source: hosted - version: "10.0.9" + version: "11.0.2" leak_tracker_flutter_testing: dependency: transitive description: name: leak_tracker_flutter_testing - sha256: f8b613e7e6a13ec79cfdc0e97638fddb3ab848452eff057653abd3edba760573 + sha256: "1dbc140bb5a23c75ea9c4811222756104fbcd1a27173f0c34ca01e16bea473c1" url: "https://pub.dev" source: hosted - version: "3.0.9" + version: "3.0.10" leak_tracker_testing: dependency: transitive description: name: leak_tracker_testing - sha256: "6ba465d5d76e67ddf503e1161d1f4a6bc42306f9d66ca1e8f079a47290fb06d3" + sha256: "8d5a2d49f4a66b49744b23b018848400d23e54caf9463f4eb20df3eb8acb2eb1" url: "https://pub.dev" source: hosted - version: "3.0.1" + version: "3.0.2" lints: dependency: transitive description: @@ -384,10 +384,10 @@ packages: dependency: transitive description: name: meta - sha256: e3641ec5d63ebf0d9b41bd43201a66e3fc79a65db5f61fc181f04cd27aab950c + sha256: "23f08335362185a5ea2ad3a4e597f1375e78bce8a040df5c600c8d3552ef2394" url: "https://pub.dev" source: hosted - version: "1.16.0" + version: "1.17.0" mime: dependency: transitive description: @@ -541,10 +541,10 @@ packages: dependency: transitive description: name: test_api - sha256: fb31f383e2ee25fbbfe06b40fe21e1e458d14080e3c67e7ba0acfde4df4e0bbd + sha256: ab2726c1a94d3176a45960b6234466ec367179b87dd74f1611adb1f3b5fb9d55 url: "https://pub.dev" source: hosted - version: "0.7.4" + version: "0.7.7" timing: dependency: transitive description: @@ -565,10 +565,10 @@ packages: dependency: transitive description: name: vector_math - sha256: "80b3257d1492ce4d091729e3a67a60407d227c27241d6927be0130c98e741803" + sha256: d530bd74fea330e6e364cda7a85019c434070188383e1cd8d9777ee586914c5b url: "https://pub.dev" source: hosted - version: "2.1.4" + version: "2.2.0" vm_service: dependency: transitive description: @@ -602,5 +602,5 @@ packages: source: hosted version: "3.1.2" sdks: - dart: ">=3.7.0-0 <4.0.0" + dart: ">=3.8.0-0 <4.0.0" flutter: ">=3.18.0-18.0.pre.54" diff --git a/fcm/pubspec.lock b/fcm/pubspec.lock index 43c357c03a..f71b760b35 100644 --- a/fcm/pubspec.lock +++ b/fcm/pubspec.lock @@ -328,26 +328,26 @@ packages: dependency: transitive description: name: leak_tracker - sha256: "6bb818ecbdffe216e81182c2f0714a2e62b593f4a4f13098713ff1685dfb6ab0" + sha256: "33e2e26bdd85a0112ec15400c8cbffea70d0f9c3407491f672a2fad47915e2de" url: "https://pub.dev" source: hosted - version: "10.0.9" + version: "11.0.2" leak_tracker_flutter_testing: dependency: transitive description: name: leak_tracker_flutter_testing - sha256: f8b613e7e6a13ec79cfdc0e97638fddb3ab848452eff057653abd3edba760573 + sha256: "1dbc140bb5a23c75ea9c4811222756104fbcd1a27173f0c34ca01e16bea473c1" url: "https://pub.dev" source: hosted - version: "3.0.9" + version: "3.0.10" leak_tracker_testing: dependency: transitive description: name: leak_tracker_testing - sha256: "6ba465d5d76e67ddf503e1161d1f4a6bc42306f9d66ca1e8f079a47290fb06d3" + sha256: "8d5a2d49f4a66b49744b23b018848400d23e54caf9463f4eb20df3eb8acb2eb1" url: "https://pub.dev" source: hosted - version: "3.0.1" + version: "3.0.2" lints: dependency: transitive description: @@ -384,10 +384,10 @@ packages: dependency: transitive description: name: meta - sha256: e3641ec5d63ebf0d9b41bd43201a66e3fc79a65db5f61fc181f04cd27aab950c + sha256: "23f08335362185a5ea2ad3a4e597f1375e78bce8a040df5c600c8d3552ef2394" url: "https://pub.dev" source: hosted - version: "1.16.0" + version: "1.17.0" mime: dependency: transitive description: @@ -541,10 +541,10 @@ packages: dependency: transitive description: name: test_api - sha256: fb31f383e2ee25fbbfe06b40fe21e1e458d14080e3c67e7ba0acfde4df4e0bbd + sha256: ab2726c1a94d3176a45960b6234466ec367179b87dd74f1611adb1f3b5fb9d55 url: "https://pub.dev" source: hosted - version: "0.7.4" + version: "0.7.7" timing: dependency: transitive description: @@ -565,10 +565,10 @@ packages: dependency: transitive description: name: vector_math - sha256: "80b3257d1492ce4d091729e3a67a60407d227c27241d6927be0130c98e741803" + sha256: d530bd74fea330e6e364cda7a85019c434070188383e1cd8d9777ee586914c5b url: "https://pub.dev" source: hosted - version: "2.1.4" + version: "2.2.0" vm_service: dependency: transitive description: @@ -602,5 +602,5 @@ packages: source: hosted version: "3.1.2" sdks: - dart: ">=3.7.0-0 <4.0.0" + dart: ">=3.8.0-0 <4.0.0" flutter: ">=3.18.0-18.0.pre.54" diff --git a/forward/pubspec.lock b/forward/pubspec.lock index 43c357c03a..f71b760b35 100644 --- a/forward/pubspec.lock +++ b/forward/pubspec.lock @@ -328,26 +328,26 @@ packages: dependency: transitive description: name: leak_tracker - sha256: "6bb818ecbdffe216e81182c2f0714a2e62b593f4a4f13098713ff1685dfb6ab0" + sha256: "33e2e26bdd85a0112ec15400c8cbffea70d0f9c3407491f672a2fad47915e2de" url: "https://pub.dev" source: hosted - version: "10.0.9" + version: "11.0.2" leak_tracker_flutter_testing: dependency: transitive description: name: leak_tracker_flutter_testing - sha256: f8b613e7e6a13ec79cfdc0e97638fddb3ab848452eff057653abd3edba760573 + sha256: "1dbc140bb5a23c75ea9c4811222756104fbcd1a27173f0c34ca01e16bea473c1" url: "https://pub.dev" source: hosted - version: "3.0.9" + version: "3.0.10" leak_tracker_testing: dependency: transitive description: name: leak_tracker_testing - sha256: "6ba465d5d76e67ddf503e1161d1f4a6bc42306f9d66ca1e8f079a47290fb06d3" + sha256: "8d5a2d49f4a66b49744b23b018848400d23e54caf9463f4eb20df3eb8acb2eb1" url: "https://pub.dev" source: hosted - version: "3.0.1" + version: "3.0.2" lints: dependency: transitive description: @@ -384,10 +384,10 @@ packages: dependency: transitive description: name: meta - sha256: e3641ec5d63ebf0d9b41bd43201a66e3fc79a65db5f61fc181f04cd27aab950c + sha256: "23f08335362185a5ea2ad3a4e597f1375e78bce8a040df5c600c8d3552ef2394" url: "https://pub.dev" source: hosted - version: "1.16.0" + version: "1.17.0" mime: dependency: transitive description: @@ -541,10 +541,10 @@ packages: dependency: transitive description: name: test_api - sha256: fb31f383e2ee25fbbfe06b40fe21e1e458d14080e3c67e7ba0acfde4df4e0bbd + sha256: ab2726c1a94d3176a45960b6234466ec367179b87dd74f1611adb1f3b5fb9d55 url: "https://pub.dev" source: hosted - version: "0.7.4" + version: "0.7.7" timing: dependency: transitive description: @@ -565,10 +565,10 @@ packages: dependency: transitive description: name: vector_math - sha256: "80b3257d1492ce4d091729e3a67a60407d227c27241d6927be0130c98e741803" + sha256: d530bd74fea330e6e364cda7a85019c434070188383e1cd8d9777ee586914c5b url: "https://pub.dev" source: hosted - version: "2.1.4" + version: "2.2.0" vm_service: dependency: transitive description: @@ -602,5 +602,5 @@ packages: source: hosted version: "3.1.2" sdks: - dart: ">=3.7.0-0 <4.0.0" + dart: ">=3.8.0-0 <4.0.0" flutter: ">=3.18.0-18.0.pre.54" diff --git a/integration_test/base/core_robot.dart b/integration_test/base/core_robot.dart index 7d586037b8..3933361a6e 100644 --- a/integration_test/base/core_robot.dart +++ b/integration_test/base/core_robot.dart @@ -6,4 +6,6 @@ abstract class CoreRobot { CoreRobot(this.$); dynamic ignoreException() => $.tester.takeException(); + + MobileAutomator get native => $.platformAutomator.mobile; } \ No newline at end of file diff --git a/integration_test/base/test_base.dart b/integration_test/base/test_base.dart index 924ef0b6aa..b413417186 100644 --- a/integration_test/base/test_base.dart +++ b/integration_test/base/test_base.dart @@ -28,8 +28,8 @@ class TestBase { visibleTimeout: Duration(seconds: 30), printLogs: true, ), - nativeAutomatorConfig: const NativeAutomatorConfig( - findTimeout: Duration(seconds: 10), + platformAutomatorConfig: PlatformAutomatorConfig.fromOptions( + findTimeout: const Duration(seconds: 10), ), framePolicy: LiveTestWidgetsFlutterBindingFramePolicy.benchmarkLive, ($) async { diff --git a/integration_test/mixin/scenario_utils_mixin.dart b/integration_test/mixin/scenario_utils_mixin.dart index 6766ba2db9..40fc27ceed 100644 --- a/integration_test/mixin/scenario_utils_mixin.dart +++ b/integration_test/mixin/scenario_utils_mixin.dart @@ -4,6 +4,7 @@ import 'dart:io' hide HttpClient; import 'package:collection/collection.dart'; import 'package:core/utils/app_logger.dart'; +import 'package:core/utils/platform_info.dart'; import 'package:flutter/widgets.dart'; import 'package:get/get.dart'; import 'package:jmap_dart_client/http/http_client.dart'; @@ -17,6 +18,7 @@ import 'package:jmap_dart_client/jmap/mail/mailbox/mailbox.dart'; import 'package:labels/extensions/list_label_extension.dart'; import 'package:model/model.dart'; import 'package:path_provider/path_provider.dart'; +import 'package:patrol/patrol.dart'; import 'package:tmail_ui_user/features/composer/domain/state/upload_attachment_state.dart'; import 'package:tmail_ui_user/features/composer/domain/usecases/create_new_and_send_email_interactor.dart'; import 'package:tmail_ui_user/features/composer/domain/usecases/upload_attachment_interactor.dart'; @@ -287,4 +289,14 @@ mixin ScenarioUtilsMixin { void hideKeyboard() { FocusManager.instance.primaryFocus?.unfocus(); } + + Future mobileBack(PatrolIntegrationTester $) async { + if (PlatformInfo.isIOS) { + await $.platformAutomator.ios.swipeBack(); + } else if (PlatformInfo.isAndroid) { + await $.platformAutomator.android.pressBack(); + } else { + throw UnsupportedError('mobileBack() is only supported on Android/iOS'); + } + } } diff --git a/integration_test/robots/composer_robot.dart b/integration_test/robots/composer_robot.dart index c1b372eca8..5759bce85a 100644 --- a/integration_test/robots/composer_robot.dart +++ b/integration_test/robots/composer_robot.dart @@ -86,9 +86,9 @@ class ComposerRobot extends CoreRobot { } Future grantContactPermission() async { - if (await $.native + if (await native .isPermissionDialogVisible(timeout: const Duration(seconds: 5))) { - await $.native.grantPermissionWhenInUse(); + await native.grantPermissionWhenInUse(); } } diff --git a/integration_test/robots/login_robot.dart b/integration_test/robots/login_robot.dart index cb69949fb4..fe6aea4c02 100644 --- a/integration_test/robots/login_robot.dart +++ b/integration_test/robots/login_robot.dart @@ -1,5 +1,4 @@ import 'package:flutter/material.dart'; -import 'package:patrol/patrol.dart'; import 'package:tmail_ui_user/main/localizations/app_localizations.dart'; import '../base/core_robot.dart'; @@ -10,9 +9,9 @@ class LoginRobot extends CoreRobot { LoginRobot(super.$); - Future grantNotificationPermission(NativeAutomator nativeAutomator) async { - if (await nativeAutomator.isPermissionDialogVisible(timeout: const Duration(seconds: 1))) { - await nativeAutomator.grantPermissionWhenInUse(); + Future grantNotificationPermission() async { + if (await native.isPermissionDialogVisible(timeout: const Duration(seconds: 1))) { + await native.grantPermissionWhenInUse(); } } diff --git a/integration_test/robots/mailbox_menu_robot.dart b/integration_test/robots/mailbox_menu_robot.dart index f43bf7d656..61e28200ca 100644 --- a/integration_test/robots/mailbox_menu_robot.dart +++ b/integration_test/robots/mailbox_menu_robot.dart @@ -84,7 +84,7 @@ class MailboxMenuRobot extends CoreRobot { } Future closeMenu() async { - await $.native.swipe(from: const Offset(0.9, 0.5), to: const Offset(0, 0.5)); + await native.swipe(from: const Offset(0.9, 0.5), to: const Offset(0, 0.5)); } int getCurrentInboxCount() { @@ -130,8 +130,8 @@ class MailboxMenuRobot extends CoreRobot { } Future tapConfirmRecoverDeletedMessages() async { - if (await $.native.isPermissionDialogVisible(timeout: const Duration(seconds: 2))) { - await $.native.grantPermissionWhenInUse(); + if (await native.isPermissionDialogVisible(timeout: const Duration(seconds: 2))) { + await native.grantPermissionWhenInUse(); } await $(AppLocalizations().restore).tap(); await $.pumpAndSettle(); diff --git a/integration_test/scenarios/app_grid_scenario.dart b/integration_test/scenarios/app_grid_scenario.dart index cfa72886f6..bf5a729058 100644 --- a/integration_test/scenarios/app_grid_scenario.dart +++ b/integration_test/scenarios/app_grid_scenario.dart @@ -35,19 +35,20 @@ class AppGridScenario extends BaseTestScenario { await Future.delayed(const Duration(seconds: 2)); if (PlatformInfo.isAndroid) { - await $.native.pressHome(); - await $.native.openApp(); + final native = $.platformAutomator.android; + await native.pressHome(); + await native.openApp(); await appGridRobot.openAppInAppGridByAppName('Twake Sync'); await Future.delayed(const Duration(seconds: 2)); - await $.native.pressBack(); + await native.pressBack(); await appGridRobot.openAppInAppGridByAppName('Twake Chat'); await Future.delayed(const Duration(seconds: 2)); - await $.native.pressBack(); - await $.native.pressBack(); + await native.pressBack(); + await native.pressBack(); await _expectMailboxViewVisible(); } else if (PlatformInfo.isIOS) { diff --git a/integration_test/scenarios/download_all_attachments_scenario.dart b/integration_test/scenarios/download_all_attachments_scenario.dart index 4bb6a1d700..4f41e8abf3 100644 --- a/integration_test/scenarios/download_all_attachments_scenario.dart +++ b/integration_test/scenarios/download_all_attachments_scenario.dart @@ -45,6 +45,6 @@ class DownloadAllAttachmentsScenario extends BaseTestScenario { } Future _expectNativeSaveButtonVisible() async { - await expectLater($.native.tap(Selector(text: 'SAVE')), completes); + await expectLater($.platformAutomator.tap(Selector(text: 'SAVE')), completes); } } \ No newline at end of file diff --git a/integration_test/scenarios/email_detailed/export_attachment_scenario.dart b/integration_test/scenarios/email_detailed/export_attachment_scenario.dart index 67f252e537..419658c5d1 100644 --- a/integration_test/scenarios/email_detailed/export_attachment_scenario.dart +++ b/integration_test/scenarios/email_detailed/export_attachment_scenario.dart @@ -42,7 +42,7 @@ class ExportAttachmentScenario extends BaseTestScenario { await emailRobot.onTapAttachmentItem(); await $.pumpAndSettle(); - await $.native.pressBack(); + await mobileBack($); _expectEmailViewVisible(); _expectExportDialogLoadingInvisible(appLocalizations); } diff --git a/integration_test/scenarios/login_with_basic_auth_scenario.dart b/integration_test/scenarios/login_with_basic_auth_scenario.dart index 1421fefcca..171198dbd1 100644 --- a/integration_test/scenarios/login_with_basic_auth_scenario.dart +++ b/integration_test/scenarios/login_with_basic_auth_scenario.dart @@ -51,7 +51,7 @@ class LoginWithBasicAuthScenario extends BaseScenario { await loginRobot.loginBasicAuth(); - await loginRobot.grantNotificationPermission($.native); + await loginRobot.grantNotificationPermission(); await _expectThreadViewVisible(); } diff --git a/integration_test/scenarios/send_email_with_read_receipt_enabled_scenario.dart b/integration_test/scenarios/send_email_with_read_receipt_enabled_scenario.dart index 419be6a340..6ed295bfe5 100644 --- a/integration_test/scenarios/send_email_with_read_receipt_enabled_scenario.dart +++ b/integration_test/scenarios/send_email_with_read_receipt_enabled_scenario.dart @@ -53,7 +53,7 @@ class SendEmailWithReadReceiptEnabledScenario extends BaseTestScenario { await threadRobot.openEmailWithSubject(emailSubject); await _expectReadReceiptRequestDialog(appLocalizations); - await $.native.pressBack(); + await mobileBack($); await emailRobot.onTapBackButton(); await $.pumpAndSettle(duration: seconds(5)); diff --git a/labels/pubspec.lock b/labels/pubspec.lock index e98c508cd6..56bbf20d49 100644 --- a/labels/pubspec.lock +++ b/labels/pubspec.lock @@ -732,26 +732,26 @@ packages: dependency: transitive description: name: leak_tracker - sha256: "6bb818ecbdffe216e81182c2f0714a2e62b593f4a4f13098713ff1685dfb6ab0" + sha256: "33e2e26bdd85a0112ec15400c8cbffea70d0f9c3407491f672a2fad47915e2de" url: "https://pub.dev" source: hosted - version: "10.0.9" + version: "11.0.2" leak_tracker_flutter_testing: dependency: transitive description: name: leak_tracker_flutter_testing - sha256: f8b613e7e6a13ec79cfdc0e97638fddb3ab848452eff057653abd3edba760573 + sha256: "1dbc140bb5a23c75ea9c4811222756104fbcd1a27173f0c34ca01e16bea473c1" url: "https://pub.dev" source: hosted - version: "3.0.9" + version: "3.0.10" leak_tracker_testing: dependency: transitive description: name: leak_tracker_testing - sha256: "6ba465d5d76e67ddf503e1161d1f4a6bc42306f9d66ca1e8f079a47290fb06d3" + sha256: "8d5a2d49f4a66b49744b23b018848400d23e54caf9463f4eb20df3eb8acb2eb1" url: "https://pub.dev" source: hosted - version: "3.0.1" + version: "3.0.2" linkify: dependency: transitive description: @@ -796,10 +796,10 @@ packages: dependency: transitive description: name: meta - sha256: e3641ec5d63ebf0d9b41bd43201a66e3fc79a65db5f61fc181f04cd27aab950c + sha256: "23f08335362185a5ea2ad3a4e597f1375e78bce8a040df5c600c8d3552ef2394" url: "https://pub.dev" source: hosted - version: "1.16.0" + version: "1.17.0" mime: dependency: transitive description: @@ -1170,10 +1170,10 @@ packages: dependency: transitive description: name: test_api - sha256: fb31f383e2ee25fbbfe06b40fe21e1e458d14080e3c67e7ba0acfde4df4e0bbd + sha256: ab2726c1a94d3176a45960b6234466ec367179b87dd74f1611adb1f3b5fb9d55 url: "https://pub.dev" source: hosted - version: "0.7.4" + version: "0.7.7" timing: dependency: transitive description: @@ -1306,10 +1306,10 @@ packages: dependency: transitive description: name: vector_math - sha256: "80b3257d1492ce4d091729e3a67a60407d227c27241d6927be0130c98e741803" + sha256: d530bd74fea330e6e364cda7a85019c434070188383e1cd8d9777ee586914c5b url: "https://pub.dev" source: hosted - version: "2.1.4" + version: "2.2.0" vm_service: dependency: transitive description: diff --git a/model/pubspec.lock b/model/pubspec.lock index e39775357b..9c1d352743 100644 --- a/model/pubspec.lock +++ b/model/pubspec.lock @@ -724,26 +724,26 @@ packages: dependency: transitive description: name: leak_tracker - sha256: "6bb818ecbdffe216e81182c2f0714a2e62b593f4a4f13098713ff1685dfb6ab0" + sha256: "33e2e26bdd85a0112ec15400c8cbffea70d0f9c3407491f672a2fad47915e2de" url: "https://pub.dev" source: hosted - version: "10.0.9" + version: "11.0.2" leak_tracker_flutter_testing: dependency: transitive description: name: leak_tracker_flutter_testing - sha256: f8b613e7e6a13ec79cfdc0e97638fddb3ab848452eff057653abd3edba760573 + sha256: "1dbc140bb5a23c75ea9c4811222756104fbcd1a27173f0c34ca01e16bea473c1" url: "https://pub.dev" source: hosted - version: "3.0.9" + version: "3.0.10" leak_tracker_testing: dependency: transitive description: name: leak_tracker_testing - sha256: "6ba465d5d76e67ddf503e1161d1f4a6bc42306f9d66ca1e8f079a47290fb06d3" + sha256: "8d5a2d49f4a66b49744b23b018848400d23e54caf9463f4eb20df3eb8acb2eb1" url: "https://pub.dev" source: hosted - version: "3.0.1" + version: "3.0.2" linkify: dependency: transitive description: @@ -788,10 +788,10 @@ packages: dependency: transitive description: name: meta - sha256: e3641ec5d63ebf0d9b41bd43201a66e3fc79a65db5f61fc181f04cd27aab950c + sha256: "23f08335362185a5ea2ad3a4e597f1375e78bce8a040df5c600c8d3552ef2394" url: "https://pub.dev" source: hosted - version: "1.16.0" + version: "1.17.0" mime: dependency: "direct main" description: @@ -1154,10 +1154,10 @@ packages: dependency: transitive description: name: test_api - sha256: fb31f383e2ee25fbbfe06b40fe21e1e458d14080e3c67e7ba0acfde4df4e0bbd + sha256: ab2726c1a94d3176a45960b6234466ec367179b87dd74f1611adb1f3b5fb9d55 url: "https://pub.dev" source: hosted - version: "0.7.4" + version: "0.7.7" timing: dependency: transitive description: @@ -1298,10 +1298,10 @@ packages: dependency: transitive description: name: vector_math - sha256: "80b3257d1492ce4d091729e3a67a60407d227c27241d6927be0130c98e741803" + sha256: d530bd74fea330e6e364cda7a85019c434070188383e1cd8d9777ee586914c5b url: "https://pub.dev" source: hosted - version: "2.1.4" + version: "2.2.0" vm_service: dependency: transitive description: @@ -1375,5 +1375,5 @@ packages: source: hosted version: "3.1.2" sdks: - dart: ">=3.7.0-0 <4.0.0" + dart: ">=3.8.0-0 <4.0.0" flutter: ">=3.27.0" diff --git a/pubspec.lock b/pubspec.lock index 74fc93b62a..cc5f3d5f4b 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -1410,26 +1410,26 @@ packages: dependency: transitive description: name: leak_tracker - sha256: "6bb818ecbdffe216e81182c2f0714a2e62b593f4a4f13098713ff1685dfb6ab0" + sha256: "33e2e26bdd85a0112ec15400c8cbffea70d0f9c3407491f672a2fad47915e2de" url: "https://pub.dev" source: hosted - version: "10.0.9" + version: "11.0.2" leak_tracker_flutter_testing: dependency: transitive description: name: leak_tracker_flutter_testing - sha256: f8b613e7e6a13ec79cfdc0e97638fddb3ab848452eff057653abd3edba760573 + sha256: "1dbc140bb5a23c75ea9c4811222756104fbcd1a27173f0c34ca01e16bea473c1" url: "https://pub.dev" source: hosted - version: "3.0.9" + version: "3.0.10" leak_tracker_testing: dependency: transitive description: name: leak_tracker_testing - sha256: "6ba465d5d76e67ddf503e1161d1f4a6bc42306f9d66ca1e8f079a47290fb06d3" + sha256: "8d5a2d49f4a66b49744b23b018848400d23e54caf9463f4eb20df3eb8acb2eb1" url: "https://pub.dev" source: hosted - version: "3.0.1" + version: "3.0.2" linagora_design_flutter: dependency: "direct main" description: @@ -1499,10 +1499,10 @@ packages: dependency: transitive description: name: meta - sha256: e3641ec5d63ebf0d9b41bd43201a66e3fc79a65db5f61fc181f04cd27aab950c + sha256: "23f08335362185a5ea2ad3a4e597f1375e78bce8a040df5c600c8d3552ef2394" url: "https://pub.dev" source: hosted - version: "1.16.0" + version: "1.17.0" middle_ellipsis_text: dependency: transitive description: @@ -1730,26 +1730,26 @@ packages: dependency: "direct dev" description: name: patrol - sha256: "782988d05af24427296e48417c36c520598656e00ba73c401a19ecd65262ee0b" + sha256: "7825a6e96a8f0755f68eec600a91a08b19bd0975488a70885b3696f6b65ffc0f" url: "https://pub.dev" source: hosted - version: "3.19.0" + version: "4.5.0" patrol_finders: dependency: "direct dev" description: name: patrol_finders - sha256: "4a658d7d560de523f92deb3fa3326c78747ca0bf7e7f4b8788c012463138b628" + sha256: "9970eac0669a90b20ec7e1bcaabd0475655655998068ca656f4df9f6ec84f336" url: "https://pub.dev" source: hosted - version: "2.9.0" + version: "3.2.0" patrol_log: dependency: "direct dev" description: name: patrol_log - sha256: "9fed4143980df1e3bbcfa00d0b443c7d68f04f9132317b7698bbc37f8a5a58c5" + sha256: a2360db165c34692665c0de146e5157887d6b584fdccca8f141f947a5acf1b2e url: "https://pub.dev" source: hosted - version: "0.5.0" + version: "0.8.0" pattern_formatter: dependency: transitive description: @@ -2311,10 +2311,10 @@ packages: dependency: transitive description: name: test_api - sha256: fb31f383e2ee25fbbfe06b40fe21e1e458d14080e3c67e7ba0acfde4df4e0bbd + sha256: ab2726c1a94d3176a45960b6234466ec367179b87dd74f1611adb1f3b5fb9d55 url: "https://pub.dev" source: hosted - version: "0.7.4" + version: "0.7.7" textfield_tags: dependency: "direct main" description: @@ -2496,10 +2496,10 @@ packages: dependency: transitive description: name: vector_math - sha256: "80b3257d1492ce4d091729e3a67a60407d227c27241d6927be0130c98e741803" + sha256: d530bd74fea330e6e364cda7a85019c434070188383e1cd8d9777ee586914c5b url: "https://pub.dev" source: hosted - version: "2.1.4" + version: "2.2.0" visibility_detector: dependency: transitive description: diff --git a/pubspec.yaml b/pubspec.yaml index 13a35d6373..844ae3932b 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -295,11 +295,11 @@ dev_dependencies: http_mock_adapter: 0.4.2 - patrol: 3.19.0 + patrol: 4.5.0 - patrol_log: 0.5.0 + patrol_log: 0.8.0 - patrol_finders: 2.9.0 + patrol_finders: 3.2.0 plugin_platform_interface: 2.1.8 @@ -444,6 +444,7 @@ cider: tag: https://github.com/linagora/tmail-flutter/releases/tag/v%tag% # initial release link template patrol: + test_directory: integration_test app_name: Twake Mail android: package_name: com.linagora.android.teammail diff --git a/rule_filter/pubspec.lock b/rule_filter/pubspec.lock index 43c357c03a..f71b760b35 100644 --- a/rule_filter/pubspec.lock +++ b/rule_filter/pubspec.lock @@ -328,26 +328,26 @@ packages: dependency: transitive description: name: leak_tracker - sha256: "6bb818ecbdffe216e81182c2f0714a2e62b593f4a4f13098713ff1685dfb6ab0" + sha256: "33e2e26bdd85a0112ec15400c8cbffea70d0f9c3407491f672a2fad47915e2de" url: "https://pub.dev" source: hosted - version: "10.0.9" + version: "11.0.2" leak_tracker_flutter_testing: dependency: transitive description: name: leak_tracker_flutter_testing - sha256: f8b613e7e6a13ec79cfdc0e97638fddb3ab848452eff057653abd3edba760573 + sha256: "1dbc140bb5a23c75ea9c4811222756104fbcd1a27173f0c34ca01e16bea473c1" url: "https://pub.dev" source: hosted - version: "3.0.9" + version: "3.0.10" leak_tracker_testing: dependency: transitive description: name: leak_tracker_testing - sha256: "6ba465d5d76e67ddf503e1161d1f4a6bc42306f9d66ca1e8f079a47290fb06d3" + sha256: "8d5a2d49f4a66b49744b23b018848400d23e54caf9463f4eb20df3eb8acb2eb1" url: "https://pub.dev" source: hosted - version: "3.0.1" + version: "3.0.2" lints: dependency: transitive description: @@ -384,10 +384,10 @@ packages: dependency: transitive description: name: meta - sha256: e3641ec5d63ebf0d9b41bd43201a66e3fc79a65db5f61fc181f04cd27aab950c + sha256: "23f08335362185a5ea2ad3a4e597f1375e78bce8a040df5c600c8d3552ef2394" url: "https://pub.dev" source: hosted - version: "1.16.0" + version: "1.17.0" mime: dependency: transitive description: @@ -541,10 +541,10 @@ packages: dependency: transitive description: name: test_api - sha256: fb31f383e2ee25fbbfe06b40fe21e1e458d14080e3c67e7ba0acfde4df4e0bbd + sha256: ab2726c1a94d3176a45960b6234466ec367179b87dd74f1611adb1f3b5fb9d55 url: "https://pub.dev" source: hosted - version: "0.7.4" + version: "0.7.7" timing: dependency: transitive description: @@ -565,10 +565,10 @@ packages: dependency: transitive description: name: vector_math - sha256: "80b3257d1492ce4d091729e3a67a60407d227c27241d6927be0130c98e741803" + sha256: d530bd74fea330e6e364cda7a85019c434070188383e1cd8d9777ee586914c5b url: "https://pub.dev" source: hosted - version: "2.1.4" + version: "2.2.0" vm_service: dependency: transitive description: @@ -602,5 +602,5 @@ packages: source: hosted version: "3.1.2" sdks: - dart: ">=3.7.0-0 <4.0.0" + dart: ">=3.8.0-0 <4.0.0" flutter: ">=3.18.0-18.0.pre.54" diff --git a/scribe/pubspec.lock b/scribe/pubspec.lock index fb23e8b026..8a2f5e0680 100644 --- a/scribe/pubspec.lock +++ b/scribe/pubspec.lock @@ -730,26 +730,26 @@ packages: dependency: transitive description: name: leak_tracker - sha256: "6bb818ecbdffe216e81182c2f0714a2e62b593f4a4f13098713ff1685dfb6ab0" + sha256: "33e2e26bdd85a0112ec15400c8cbffea70d0f9c3407491f672a2fad47915e2de" url: "https://pub.dev" source: hosted - version: "10.0.9" + version: "11.0.2" leak_tracker_flutter_testing: dependency: transitive description: name: leak_tracker_flutter_testing - sha256: f8b613e7e6a13ec79cfdc0e97638fddb3ab848452eff057653abd3edba760573 + sha256: "1dbc140bb5a23c75ea9c4811222756104fbcd1a27173f0c34ca01e16bea473c1" url: "https://pub.dev" source: hosted - version: "3.0.9" + version: "3.0.10" leak_tracker_testing: dependency: transitive description: name: leak_tracker_testing - sha256: "6ba465d5d76e67ddf503e1161d1f4a6bc42306f9d66ca1e8f079a47290fb06d3" + sha256: "8d5a2d49f4a66b49744b23b018848400d23e54caf9463f4eb20df3eb8acb2eb1" url: "https://pub.dev" source: hosted - version: "3.0.1" + version: "3.0.2" linkify: dependency: transitive description: @@ -794,10 +794,10 @@ packages: dependency: transitive description: name: meta - sha256: e3641ec5d63ebf0d9b41bd43201a66e3fc79a65db5f61fc181f04cd27aab950c + sha256: "23f08335362185a5ea2ad3a4e597f1375e78bce8a040df5c600c8d3552ef2394" url: "https://pub.dev" source: hosted - version: "1.16.0" + version: "1.17.0" mime: dependency: transitive description: @@ -1176,10 +1176,10 @@ packages: dependency: transitive description: name: test_api - sha256: fb31f383e2ee25fbbfe06b40fe21e1e458d14080e3c67e7ba0acfde4df4e0bbd + sha256: ab2726c1a94d3176a45960b6234466ec367179b87dd74f1611adb1f3b5fb9d55 url: "https://pub.dev" source: hosted - version: "0.7.4" + version: "0.7.7" timing: dependency: transitive description: @@ -1312,10 +1312,10 @@ packages: dependency: transitive description: name: vector_math - sha256: "80b3257d1492ce4d091729e3a67a60407d227c27241d6927be0130c98e741803" + sha256: d530bd74fea330e6e364cda7a85019c434070188383e1cd8d9777ee586914c5b url: "https://pub.dev" source: hosted - version: "2.1.4" + version: "2.2.0" vm_service: dependency: transitive description: diff --git a/scripts/patrol-integration-test-with-docker.sh b/scripts/patrol-integration-test-with-docker.sh index 589e2e0858..b8c91ae880 100755 --- a/scripts/patrol-integration-test-with-docker.sh +++ b/scripts/patrol-integration-test-with-docker.sh @@ -8,7 +8,7 @@ curl -sSL https://ngrok-agent.s3.amazonaws.com/ngrok.asc | sudo tee /etc/apt/tru # Install patrol CLI echo "Installing patrol CLI..." -dart pub global activate patrol_cli 3.6.0 +dart pub global activate patrol_cli 4.3.1 flutter build apk --config-only # Forward traffic to tmail-backend diff --git a/server_settings/pubspec.lock b/server_settings/pubspec.lock index f18aacd302..7ccf86e27b 100644 --- a/server_settings/pubspec.lock +++ b/server_settings/pubspec.lock @@ -320,26 +320,26 @@ packages: dependency: transitive description: name: leak_tracker - sha256: "6bb818ecbdffe216e81182c2f0714a2e62b593f4a4f13098713ff1685dfb6ab0" + sha256: "33e2e26bdd85a0112ec15400c8cbffea70d0f9c3407491f672a2fad47915e2de" url: "https://pub.dev" source: hosted - version: "10.0.9" + version: "11.0.2" leak_tracker_flutter_testing: dependency: transitive description: name: leak_tracker_flutter_testing - sha256: f8b613e7e6a13ec79cfdc0e97638fddb3ab848452eff057653abd3edba760573 + sha256: "1dbc140bb5a23c75ea9c4811222756104fbcd1a27173f0c34ca01e16bea473c1" url: "https://pub.dev" source: hosted - version: "3.0.9" + version: "3.0.10" leak_tracker_testing: dependency: transitive description: name: leak_tracker_testing - sha256: "6ba465d5d76e67ddf503e1161d1f4a6bc42306f9d66ca1e8f079a47290fb06d3" + sha256: "8d5a2d49f4a66b49744b23b018848400d23e54caf9463f4eb20df3eb8acb2eb1" url: "https://pub.dev" source: hosted - version: "3.0.1" + version: "3.0.2" logging: dependency: transitive description: @@ -368,10 +368,10 @@ packages: dependency: transitive description: name: meta - sha256: e3641ec5d63ebf0d9b41bd43201a66e3fc79a65db5f61fc181f04cd27aab950c + sha256: "23f08335362185a5ea2ad3a4e597f1375e78bce8a040df5c600c8d3552ef2394" url: "https://pub.dev" source: hosted - version: "1.16.0" + version: "1.17.0" mime: dependency: transitive description: @@ -525,10 +525,10 @@ packages: dependency: transitive description: name: test_api - sha256: fb31f383e2ee25fbbfe06b40fe21e1e458d14080e3c67e7ba0acfde4df4e0bbd + sha256: ab2726c1a94d3176a45960b6234466ec367179b87dd74f1611adb1f3b5fb9d55 url: "https://pub.dev" source: hosted - version: "0.7.4" + version: "0.7.7" timing: dependency: transitive description: @@ -549,10 +549,10 @@ packages: dependency: transitive description: name: vector_math - sha256: "80b3257d1492ce4d091729e3a67a60407d227c27241d6927be0130c98e741803" + sha256: d530bd74fea330e6e364cda7a85019c434070188383e1cd8d9777ee586914c5b url: "https://pub.dev" source: hosted - version: "2.1.4" + version: "2.2.0" vm_service: dependency: transitive description: @@ -586,5 +586,5 @@ packages: source: hosted version: "3.1.2" sdks: - dart: ">=3.7.0-0 <4.0.0" + dart: ">=3.8.0-0 <4.0.0" flutter: ">=3.18.0-18.0.pre.54" diff --git a/test/features/email/presentation/controller/single_email_controller_test.dart b/test/features/email/presentation/controller/single_email_controller_test.dart index d37bf7db27..dd98132be8 100644 --- a/test/features/email/presentation/controller/single_email_controller_test.dart +++ b/test/features/email/presentation/controller/single_email_controller_test.dart @@ -441,23 +441,6 @@ void main() { when(mailboxDashboardController.viewState).thenReturn(Rx(Right(UIState.idle))); when(mailboxDashboardController.downloadController).thenReturn(downloadController); when(downloadController.downloadUIAction).thenAnswer((_) => Rxn(DownloadUIAction.idle)); - when(appToast.showToastMessageWithMultipleActions( - any, - any, - actions: anyNamed('actions'), - textColor: anyNamed('textColor'), - backgroundColor: anyNamed('backgroundColor'), - infinityToast: anyNamed('infinityToast'), - )).thenAnswer((realInvocation) { - AppToast().showToastMessageWithMultipleActions( - realInvocation.positionalArguments[0], - realInvocation.positionalArguments[1], - actions: realInvocation.namedArguments[const Symbol('actions')], - textColor: realInvocation.namedArguments[const Symbol('textColor')], - backgroundColor: realInvocation.namedArguments[const Symbol('backgroundColor')], - infinityToast: realInvocation.namedArguments[const Symbol('infinityToast')], - ); - }); when(imagePaths.icUndo).thenReturn(ImagePaths().icUndo); when(imagePaths.icClose).thenReturn(ImagePaths().icClose); Get.put(singleEmailController); @@ -473,9 +456,18 @@ void main() { await tester.pump(); // assert - expect(find.text(AppLocalizations().unknownError), findsOneWidget); - expect(find.text(AppLocalizations().retry), findsOneWidget); - expect(find.text(AppLocalizations().close), findsOneWidget); + final captured = verify(appToast.showToastMessageWithMultipleActions( + any, + captureAny, + actions: captureAnyNamed('actions'), + textColor: anyNamed('textColor'), + backgroundColor: anyNamed('backgroundColor'), + infinityToast: anyNamed('infinityToast'), + )).captured; + expect(captured[0], AppLocalizations().unknownError); + final actions = captured[1] as List<({String? actionName, Function? onActionClick, Widget? actionIcon})>; + expect(actions.any((a) => a.actionName == AppLocalizations().retry), isTrue); + expect(actions.any((a) => a.actionName == AppLocalizations().close), isTrue); // cleanup Get.delete();