mirror of
https://github.com/linagora/tmail-flutter.git
synced 2026-12-06 16:04:20 +00:00
* Patrol POC replace Firebase Test Lab with local Android emulator Replace GCloud auth, Firebase Test Lab, and ngrok with a local Android AVD via reactivecircus/android-emulator-runner on CI. The backend runs in Docker and is reachable from the emulator at the QEMU host alias 10.0.2.2. CI / scripts: - Remove Google Cloud auth, Firebase run step, and ngrok tunnel - Add KVM, Gradle, and AVD cache setup; shard tests across 4 parallel runners - Scripts: drop ngrok, point jmap.properties to 10.0.2.2, manage cleanup via trap - prebuild.sh: parallelize module builds, suppress noisy output - provisioning.sh: parallelize james-cli/curl calls, fix hardcoded container IP Backend reset for test isolation: - Add backend-reset-server.py: HTTP server that restarts tmail-backend and re-runs provisioning on POST /reset, so each test starts with a clean state - Add BackendResetClient.dart: Dart client called in patrolTearDown - Reduce visibleTimeout 30s → 10s; allow insecure connections in debug mode * Patrol POC fix flaky tests Replace fixed pumpAndSettle delays with waitUntilVisible/waitUntilExists so tests react to actual UI state rather than arbitrary timeouts. - Add PatrolFileExtensions.toFileInfo() and use it in composer robot/scenario utils - Guard MobileEditorWidget.dispose() under isIntegrationTesting to prevent teardown crash - Fix scroll direction (AxisDirection.down) in calendar attendee button scroll - Add scrollTo() before tap in label modal robot and edit-tag scenario - Wait on EmailTileBuilder (not label name) after email provisioning — more reliable - Inline image: wait for HtmlContentViewer to contain base64 data before asserting - Use native platform wait for inline image in upload scenario - Remove unnecessary Future.delayed and extra pumpAndSettle calls - Pre-select English before switching language to ensure deterministic starting state - Fix app_grid back-press sequence
109 lines
3.4 KiB
Dart
109 lines
3.4 KiB
Dart
import 'package:flutter/material.dart';
|
|
import 'package:flutter_test/flutter_test.dart';
|
|
import 'package:tmail_ui_user/features/base/widget/labels/tag_widget.dart';
|
|
import 'package:tmail_ui_user/features/email/presentation/widgets/attachment_item_widget.dart';
|
|
import 'package:tmail_ui_user/features/email/presentation/widgets/email_subject_widget.dart';
|
|
import 'package:tmail_ui_user/features/email/presentation/widgets/email_view_back_button.dart';
|
|
import 'package:tmail_ui_user/features/email/presentation/widgets/information_sender_and_receiver_builder.dart';
|
|
import 'package:tmail_ui_user/features/labels/presentation/widgets/label_widget.dart';
|
|
import 'package:tmail_ui_user/main/localizations/app_localizations.dart';
|
|
|
|
import '../base/core_robot.dart';
|
|
|
|
class EmailRobot extends CoreRobot {
|
|
EmailRobot(super.$);
|
|
|
|
Future<void> onTapForwardEmail() async {
|
|
await $(#forward_email_button).tap();
|
|
await $.pump(const Duration(seconds: 2));
|
|
}
|
|
|
|
Future<void> tapDownloadAllButton() async {
|
|
await $(#download_all_attachments_button).tap();
|
|
}
|
|
|
|
Future<void> onTapReplyEmail() async {
|
|
await $(#reply_email_button).tap();
|
|
}
|
|
|
|
Future<void> onTapReplyToListEmail() async {
|
|
await $(#reply_to_list_email_button).tap();
|
|
}
|
|
|
|
Future<void> onTapReplyAllEmail() async {
|
|
await $(#reply_all_emails_button).tap();
|
|
}
|
|
|
|
Future<void> onTapBackButton() async {
|
|
await $(find.byType(EmailViewBackButton)).first.tap();
|
|
}
|
|
|
|
Future<void> tapEmailDetailedMoreButton() async {
|
|
await $(#email_detailed_more_button).tap();
|
|
}
|
|
|
|
Future<void> tapMarkAsUnreadOptionInContextMenu() async {
|
|
await $(AppLocalizations().mark_as_unread).tap();
|
|
}
|
|
|
|
Future<void> tapEmailDetailedStarButton() async {
|
|
await $(AppLocalizations().starred).tap();
|
|
}
|
|
|
|
Future<void> tapEmailDetailedLabelAsOptionInContextMenu() async {
|
|
await $(#labelAs_action).tap();
|
|
}
|
|
|
|
Future<void> tapEmailDetailedUnstarButton() async {
|
|
await $(AppLocalizations().not_starred).tap();
|
|
}
|
|
|
|
Future<void> tapEmailDetailedMoveEmailButton() async {
|
|
await $(AppLocalizations().moveMessage).tap();
|
|
}
|
|
|
|
Future<void> tapEmailDetailedDeleteEmailButton() async {
|
|
await $(AppLocalizations().move_to_trash).tap();
|
|
}
|
|
|
|
Future<void> tapMarkAsSpamOptionInContextMenu() async {
|
|
await $(AppLocalizations().markAsSpam).tap();
|
|
}
|
|
|
|
Future<void> tapArchiveMessageOptionInContextMenu() async {
|
|
await $(AppLocalizations().archiveMessage).tap();
|
|
}
|
|
|
|
Future<void> tapSenderEmailAddress(String email) async {
|
|
await $(InformationSenderAndReceiverBuilder).$(email).tap();
|
|
}
|
|
|
|
Future<void> tapRecipientEmailAddress(String email) async {
|
|
await $(InformationSenderAndReceiverBuilder).$(email).tap();
|
|
}
|
|
|
|
Future<void> longPressSenderEmailAddress(String email) async {
|
|
await $(InformationSenderAndReceiverBuilder).$(email).longPress();
|
|
}
|
|
|
|
Future<void> onTapAttachmentItem() async {
|
|
await $(AttachmentItemWidget).$(InkWell).tap();
|
|
}
|
|
|
|
Future<void> tapRemoveLabelButton(String labelDisplayName) async {
|
|
await $(EmailSubjectWidget)
|
|
.$(LabelWidget)
|
|
.$(TagWidget)
|
|
.which<TagWidget>((widget) => widget.text == labelDisplayName)
|
|
.$(InkWell)
|
|
.tap();
|
|
}
|
|
|
|
Future<void> tapDeleteThreadButton() async {
|
|
await $(#delete_thread_button).tap();
|
|
}
|
|
|
|
Future<void> tapMailToAttendeesEventActionButton() async {
|
|
await $(#mailToAttendees_event_action_button).tap();
|
|
}
|
|
} |