Commit Graph
28 Commits
Author SHA1 Message Date
Dat Dang 3851df15c6 Patrol isolate Android tests (#4469)
* 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
2026-05-11 08:09:31 +07:00
Dat Dang b18813a096 Patrol web POC (#4450)
* Patrol POC add UIKeys to production widgets for web testability

Add semantic UIKeys to composer widgets, login controller, mailbox
dashboard, thread view, and web finger extension to enable reliable
widget targeting in Patrol web integration tests.

* Patrol POC add web login and send email Patrol integration test scenarios

Add web-specific test scenarios (login with basic auth, send email),
a new web_send_email_test entry point, and a web tag in TestTags.
Update test_base, requires_login_mixin, composer_robot, and
thread_robot to support web platform.

* Patrol POC add Patrol web integration test workflow and scripts

Add GitHub Actions workflow for running Patrol web integration tests.
Add patrol-web-integration-test-with-docker.sh and
patrol-web-local-integration-test-with-docker.sh scripts.
Minor fix to patrol-local-integration-test-with-docker.sh.

* Patrol POC update gitignore and web/index.html for Patrol web support

* poc: implement cross-platform robot factory architecture

Introduces Abstract Factory + conditional export infrastructure from
ADR-0081. Platform selection resolved at compile time via dart.library.html
— no if/else in any logic class.

New structure:
- factories/: RobotFactory, Mobile/WebRobotFactory, conditional provider
- robots/abstract/: AbstractLogin/Thread/ComposerRobot interfaces
- robots/mobile/: thin wrappers over existing robots
- robots/web/: WebComposerRobot overrides addContent for web
2026-04-21 14:34:47 +07:00
dab246 cb41b5690b TF-4308 Add E2E tests for ChooseLabelModal and NoLabelYetWidget
Signed-off-by: dab246 <tdvu@linagora.com>
2026-04-17 17:09:24 +07:00
dab246 879b18bc45 TF-4236 Fix guard delete UI when no handler is provided. 2026-01-27 12:04:11 +07:00
dab246 326f5e46f5 TF-4236 Add integration test on mobile for case remove_a_label_from_email_scenario 2026-01-27 12:04:11 +07:00
DatDang bfb20d3b6c TF-3569 E2E Mailbox toggle read/star/spam 2025-09-17 16:15:28 +07:00
DatDang e6c3ebf0d7 TF-3579 E2E Mailbox mark as read 2025-09-17 12:47:45 +07:00
DatDang a65bf27bb9 TF-3579 E2E Mailbox move and delete email 2025-09-17 12:47:45 +07:00
DatDang 7f4dcf8b38 TF-3611 E2E Long press spam empty and recover 2025-09-17 09:42:26 +07:00
DatDang 1799364a35 TF-3611 E2E Long press trash empty and recover 2025-09-17 09:42:26 +07:00
DatDang 8fe9e4905e TF-3611 E2E Spam mailbox empty and recover 2025-09-17 09:42:26 +07:00
DatDang 90e4962dd4 TF-3611 E2E Trash mailbox empty and recover 2025-09-17 09:42:26 +07:00
DatDang e82039152c TF-3558 E2E Mailbox switch 2025-09-16 06:05:51 +07:00
DatDang a1c7fbe242 TF-3558 E2E Mailbox pull to refresh 2025-09-16 06:05:51 +07:00
Dang Dat c6ace7a9b5 E2E Fix integration test Twake Mail v0.18.4
E2E Fix integration test Twake Mail v0.18.4
2025-09-11 10:31:20 +07:00
DatDang f3376e32fa TF-3551 E2E Mailbox quick filter 2025-09-11 10:31:20 +07:00
DatDang 4836f55a19 TF-3551 E2E Mailbox scroll and back to top 2025-09-11 10:31:20 +07:00
DatDang 8e500a2ac5 HOTFIX Fix integration tests 2025-07-16 10:26:26 +07:00
dab246 b6de5d9391 TF-3707 Add integration test for case empty trash
Signed-off-by: dab246 <tdvu@linagora.com>
2025-05-06 21:15:42 -07:00
DatDang 69f287d117 fixup! TF-3649 Fix reply to own sent email 2025-04-15 02:42:58 -07:00
DatDang d611853ca6 fixup! TF-3649 Fix reply to own sent email 2025-04-15 02:42:58 -07:00
dab246 4aef1698a4 TF-3514 Add integration test for reply email with content contain image base64
Signed-off-by: dab246 <tdvu@linagora.com>
2025-03-10 03:02:19 -07:00
dab246 81da9e6e07 TF-3493 Upgrade Patrol to version 3.14.0 and Patrol_CLI to version 3.5.0
Signed-off-by: dab246 <tdvu@linagora.com>
2025-02-23 22:40:30 -08:00
dab246 bbb98a2a49 TF-3260 Add integration test for app grid
Signed-off-by: dab246 <tdvu@linagora.com>
2025-02-19 00:00:02 -08:00
Dat Dang 2d976bed18 TF-3369 Fix cid image without disposition (#3373) 2025-02-05 03:00:08 -08:00
DatDang 1ece796185 TF-3236 Add integration test to search snippet 2024-11-20 13:53:56 +07:00
dab246 51a4a1b9b7 TF-2528 Add integration test for search email with sort by sender nam…e ascending 2024-11-14 10:30:40 +07:00
DatDang 25437ba92e TF-2953 Set up Patrol tests 2024-11-01 10:01:18 +07:00