Fix logic forward_email in E2E test to avoid build integration test on CI fail
Signed-off-by: dab246 <tdvu@linagora.com>
This commit is contained in:
@@ -4,7 +4,6 @@ import 'package:rich_text_composer/rich_text_composer.dart';
|
|||||||
import 'package:tmail_ui_user/features/composer/presentation/composer_controller.dart';
|
import 'package:tmail_ui_user/features/composer/presentation/composer_controller.dart';
|
||||||
import 'package:tmail_ui_user/features/composer/presentation/composer_view.dart';
|
import 'package:tmail_ui_user/features/composer/presentation/composer_view.dart';
|
||||||
import 'package:tmail_ui_user/features/composer/presentation/view/mobile/mobile_editor_view.dart';
|
import 'package:tmail_ui_user/features/composer/presentation/view/mobile/mobile_editor_view.dart';
|
||||||
import 'package:tmail_ui_user/features/email/presentation/email_view.dart';
|
|
||||||
import 'package:tmail_ui_user/features/search/email/presentation/search_email_view.dart';
|
import 'package:tmail_ui_user/features/search/email/presentation/search_email_view.dart';
|
||||||
|
|
||||||
import '../base/base_test_scenario.dart';
|
import '../base/base_test_scenario.dart';
|
||||||
@@ -19,25 +18,28 @@ class ForwardEmailScenario extends BaseTestScenario {
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
Future<void> runTestLogic() async {
|
Future<void> runTestLogic() async {
|
||||||
|
const emailSubject = 'Forward email';
|
||||||
|
|
||||||
final threadRobot = ThreadRobot($);
|
final threadRobot = ThreadRobot($);
|
||||||
|
final searchRobot = SearchRobot($);
|
||||||
|
final emailRobot = EmailRobot($);
|
||||||
|
final composerRobot = ComposerRobot($);
|
||||||
|
|
||||||
await threadRobot.openSearchView();
|
await threadRobot.openSearchView();
|
||||||
await _expectSearchViewVisible();
|
await _expectSearchViewVisible();
|
||||||
|
|
||||||
final searchRobot = SearchRobot($);
|
await searchRobot.enterQueryString(emailSubject);
|
||||||
await searchRobot.enterQueryString('Forward email');
|
|
||||||
await _expectSuggestionSearchListViewVisible();
|
|
||||||
await searchRobot.tapOnShowAllResultsText();
|
await searchRobot.tapOnShowAllResultsText();
|
||||||
await _expectSearchResultEmailListVisible();
|
await _expectSearchResultEmailListVisible();
|
||||||
|
|
||||||
await searchRobot.openEmailWithSubject('Fwd: Forward email');
|
await $.pumpAndSettle(duration: const Duration(seconds: 2));
|
||||||
await _expectEmailViewVisible();
|
|
||||||
|
await searchRobot.openEmailWithSubject(emailSubject);
|
||||||
await _expectForwardEmailButtonVisible();
|
await _expectForwardEmailButtonVisible();
|
||||||
|
|
||||||
final emailRobot = EmailRobot($);
|
|
||||||
await emailRobot.onTapForwardEmail();
|
await emailRobot.onTapForwardEmail();
|
||||||
await _expectComposerViewVisible();
|
await _expectComposerViewVisible();
|
||||||
|
|
||||||
final composerRobot = ComposerRobot($);
|
|
||||||
await composerRobot.grantContactPermission();
|
await composerRobot.grantContactPermission();
|
||||||
await _expectMobileEditorViewVisible();
|
await _expectMobileEditorViewVisible();
|
||||||
|
|
||||||
@@ -48,22 +50,12 @@ class ForwardEmailScenario extends BaseTestScenario {
|
|||||||
await expectViewVisible($(SearchEmailView));
|
await expectViewVisible($(SearchEmailView));
|
||||||
}
|
}
|
||||||
|
|
||||||
Future<void> _expectSuggestionSearchListViewVisible() async {
|
|
||||||
await expectViewVisible($(#suggestion_search_list_view));
|
|
||||||
}
|
|
||||||
|
|
||||||
Future<void> _expectSearchResultEmailListVisible() async {
|
Future<void> _expectSearchResultEmailListVisible() async {
|
||||||
await expectViewVisible($(#search_email_list_notification_listener));
|
await expectViewVisible($(#search_email_list_notification_listener));
|
||||||
await $.pump(const Duration(seconds: 3));
|
|
||||||
}
|
|
||||||
|
|
||||||
Future<void> _expectEmailViewVisible() async {
|
|
||||||
await expectViewVisible($(EmailView));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Future<void> _expectForwardEmailButtonVisible() async {
|
Future<void> _expectForwardEmailButtonVisible() async {
|
||||||
await expectViewVisible($(#forward_email_button));
|
await expectViewVisible($(#forward_email_button));
|
||||||
await $.pump(const Duration(seconds: 3));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Future<void> _expectComposerViewVisible() async {
|
Future<void> _expectComposerViewVisible() async {
|
||||||
|
|||||||
+5
-13
@@ -1,12 +1,11 @@
|
|||||||
Return-Path: <emma@example.com>
|
Return-Path: <emma@example.com>
|
||||||
MIME-Version: 1.0
|
MIME-Version: 1.0
|
||||||
References: <Mime4j.4c.b3b452d18f0d0ef9.192d67aaafc@example.com>
|
References: <Mime4j.4c.b3b452d18f0d0ef9.192d67aaafc@example.com>
|
||||||
Subject: Fwd: Forward email to Bob
|
Subject: Forward email
|
||||||
From: emma@example.com
|
From: emma@example.com
|
||||||
To: "bob@example.com" <bob@example.com>
|
To: "bob" <bob@example.com>
|
||||||
Cc: "alice@example.com" <alice@example.com>
|
Cc: "alice" <alice@example.com>
|
||||||
Bcc: "brian@example.com" <brian@example.com>
|
Bcc: "brian" <brian@example.com>
|
||||||
Reply-To: emma@example.com
|
|
||||||
Date: Tue, 17 Dec 2024 16:31:00 +0000
|
Date: Tue, 17 Dec 2024 16:31:00 +0000
|
||||||
Message-ID: <Mime4j.4e.728b2b72b23cc182.192d67ae03c@example.com>
|
Message-ID: <Mime4j.4e.728b2b72b23cc182.192d67ae03c@example.com>
|
||||||
User-Agent: Twake-Mail/0.13.2 Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15;
|
User-Agent: Twake-Mail/0.13.2 Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15;
|
||||||
@@ -20,7 +19,7 @@ Content-Transfer-Encoding: quoted-printable
|
|||||||
Accept-Language: fr-FR, en-US, vi-VN, ru-RU, ar-TN, it-IT
|
Accept-Language: fr-FR, en-US, vi-VN, ru-RU, ar-TN, it-IT
|
||||||
Content-Language: en-US
|
Content-Language: en-US
|
||||||
|
|
||||||
Forward email to Bob
|
Forward email
|
||||||
|
|
||||||
Invite you in to a meeting: Event OPEN TECH TALK: INNOVATION FOR THE TWAKE WORKPLACE
|
Invite you in to a meeting: Event OPEN TECH TALK: INNOVATION FOR THE TWAKE WORKPLACE
|
||||||
|
|
||||||
@@ -32,11 +31,4 @@ Our 3rd Open Tech Talk in 2024!
|
|||||||
|
|
||||||
We are waiting for you!
|
We are waiting for you!
|
||||||
|
|
||||||
---=Part.4f.450e1cfbcd355387.192d67ae03d.c367d8042fea24dd=-
|
|
||||||
Content-Type: text/html; charset=UTF-8
|
|
||||||
Content-Transfer-Encoding: quoted-printable
|
|
||||||
Accept-Language: fr-FR, en-US, vi-VN, ru-RU, ar-TN, it-IT
|
|
||||||
Content-Language: en-US
|
|
||||||
|
|
||||||
|
|
||||||
---=Part.4f.450e1cfbcd355387.192d67ae03d.c367d8042fea24dd=---
|
---=Part.4f.450e1cfbcd355387.192d67ae03d.c367d8042fea24dd=---
|
||||||
@@ -50,8 +50,8 @@ done
|
|||||||
|
|
||||||
# For test forward email
|
# For test forward email
|
||||||
# Import emails into 'Forward Emails' folder for user Bob
|
# Import emails into 'Forward Emails' folder for user Bob
|
||||||
echo "Importing 0.eml into 'Forward Emails' folder for user bob"
|
echo "Importing forward.eml into 'Forward Emails' folder for user bob"
|
||||||
james-cli ImportEml \#private "bob@example.com" "Forward Emails" "/root/conf/integration_test/eml/forward_email/0.eml"
|
james-cli ImportEml \#private "bob@example.com" "Forward Emails" "/root/conf/integration_test/eml/forward_email/forward.eml"
|
||||||
|
|
||||||
# For test email with no-disposition inline image
|
# For test email with no-disposition inline image
|
||||||
# Import email into 'Disposition' folder for user Bob
|
# Import email into 'Disposition' folder for user Bob
|
||||||
|
|||||||
Reference in New Issue
Block a user