E2E Fix integration test Twake Mail v0.18.4
E2E Fix integration test Twake Mail v0.18.4
This commit is contained in:
@@ -38,10 +38,10 @@ class ArchiveEmailScenario extends BaseTestScenario {
|
||||
_expectEmailDetailedMoreButtonVisible();
|
||||
|
||||
await emailRobot.tapEmailDetailedMoreButton();
|
||||
await $.pumpAndSettle(duration: const Duration(seconds: 2));
|
||||
await $.pumpAndSettle(duration: const Duration(seconds: 1));
|
||||
|
||||
await emailRobot.tapArchiveMessageOptionInContextMenu();
|
||||
await $.pumpAndSettle(duration: const Duration(seconds: 3));
|
||||
await $.pumpAndSettle(duration: const Duration(seconds: 1));
|
||||
|
||||
await emailRobot.onTapBackButton();
|
||||
await $.pumpAndSettle();
|
||||
|
||||
@@ -37,8 +37,9 @@ class DeleteEmailScenario extends BaseTestScenario {
|
||||
await threadRobot.openEmailWithSubject(subject);
|
||||
await $.pumpAndSettle();
|
||||
|
||||
await emailRobot.tapEmailDetailedMoreButton();
|
||||
await emailRobot.tapEmailDetailedDeleteEmailButton();
|
||||
await $.pumpAndSettle(duration: const Duration(seconds: 3));
|
||||
await $.pumpAndSettle(duration: const Duration(seconds: 1));
|
||||
|
||||
_expectEmailViewInvisible();
|
||||
|
||||
|
||||
+1
-1
@@ -52,7 +52,7 @@ class DisplayEmailAddressInfoDialogScenario extends BaseTestScenario {
|
||||
Future<void> _expectEmailAddressInfoDialogVisible(
|
||||
AppLocalizations appLocalizations,
|
||||
) async {
|
||||
await expectViewVisible($(appLocalizations.copy_email_address));
|
||||
await expectViewVisible($(#copy_email_address));
|
||||
await expectViewVisible($(appLocalizations.quickCreatingRule));
|
||||
await expectViewVisible($(appLocalizations.compose_email));
|
||||
}
|
||||
|
||||
@@ -1,6 +1,3 @@
|
||||
|
||||
import 'package:core/presentation/resources/image_paths.dart';
|
||||
import 'package:core/presentation/views/button/tmail_button_widget.dart';
|
||||
import 'package:flutter_test/flutter_test.dart';
|
||||
|
||||
import '../../base/base_test_scenario.dart';
|
||||
@@ -18,7 +15,6 @@ class MarkAsStarEmailScenario extends BaseTestScenario {
|
||||
const emailUser = String.fromEnvironment('BASIC_AUTH_EMAIL');
|
||||
final threadRobot = ThreadRobot($);
|
||||
final emailRobot = EmailRobot($);
|
||||
final imagePaths = ImagePaths();
|
||||
|
||||
await provisionEmail(
|
||||
[
|
||||
@@ -34,32 +30,29 @@ class MarkAsStarEmailScenario extends BaseTestScenario {
|
||||
|
||||
await threadRobot.openEmailWithSubject(subject);
|
||||
await $.pumpAndSettle();
|
||||
_expectEmailDetailedStarButtonVisible();
|
||||
await emailRobot.tapEmailDetailedMoreButton();
|
||||
await _expectEmailDetailedStarButtonVisible();
|
||||
|
||||
await emailRobot.tapEmailDetailedStarButton();
|
||||
await $.pumpAndSettle(duration: const Duration(seconds: 2));
|
||||
await _expectDisplayedStarIcon(imagePaths);
|
||||
await $.pumpAndSettle(duration: const Duration(seconds: 1));
|
||||
await emailRobot.tapEmailDetailedMoreButton();
|
||||
await _expectDisplayedUnStarIcon();
|
||||
|
||||
await emailRobot.tapEmailDetailedStarButton();
|
||||
await $.pumpAndSettle(duration: const Duration(seconds: 2));
|
||||
await _expectDisplayedUnStarIcon(imagePaths);
|
||||
await emailRobot.tapEmailDetailedUnstarButton();
|
||||
await $.pumpAndSettle(duration: const Duration(seconds: 1));
|
||||
await emailRobot.tapEmailDetailedMoreButton();
|
||||
await _expectDisplayedStarIcon();
|
||||
}
|
||||
|
||||
void _expectEmailDetailedStarButtonVisible() {
|
||||
expect($(#email_detailed_star_button), findsOneWidget);
|
||||
Future<void> _expectEmailDetailedStarButtonVisible() async {
|
||||
await expectViewVisible($(#markAsStarred_action));
|
||||
}
|
||||
|
||||
Future<void> _expectDisplayedStarIcon(ImagePaths imagePaths) async {
|
||||
await expectViewVisible(
|
||||
$(#email_detailed_star_button).which<TMailButtonWidget>(
|
||||
(widget) => widget.icon == imagePaths.icStar),
|
||||
);
|
||||
Future<void> _expectDisplayedStarIcon() async {
|
||||
await expectViewVisible($(#markAsStarred_action));
|
||||
}
|
||||
|
||||
Future<void> _expectDisplayedUnStarIcon(ImagePaths imagePaths) async {
|
||||
await expectViewVisible(
|
||||
$(#email_detailed_star_button).which<TMailButtonWidget>(
|
||||
(widget) => widget.icon == imagePaths.icUnStar),
|
||||
);
|
||||
Future<void> _expectDisplayedUnStarIcon() async {
|
||||
await expectViewVisible($(#unMarkAsStarred_action));
|
||||
}
|
||||
}
|
||||
@@ -38,6 +38,7 @@ class MoveEmailToFolderScenario extends BaseTestScenario {
|
||||
await threadRobot.openEmailWithSubject(subject);
|
||||
await $.pumpAndSettle();
|
||||
|
||||
await emailRobot.tapEmailDetailedMoreButton();
|
||||
await emailRobot.tapEmailDetailedMoveEmailButton();
|
||||
await $.pumpAndSettle(duration: const Duration(seconds: 2));
|
||||
|
||||
|
||||
@@ -79,12 +79,15 @@ class ReplyEmailWithReplyToScenario extends BaseTestScenario {
|
||||
}
|
||||
|
||||
Future<void> _expectToFieldContainReplyToEmailAddress() async {
|
||||
expect(
|
||||
$(RecipientComposerWidget).which<RecipientComposerWidget>((widget) =>
|
||||
widget.prefix == PrefixEmailAddress.to &&
|
||||
isMatchingEmailList(widget.listEmailAddress, {'emma-reply-to@example.com'})
|
||||
).visible,
|
||||
isTrue,
|
||||
await expectViewVisible(
|
||||
$(RecipientComposerWidget).which<RecipientComposerWidget>(
|
||||
(widget) =>
|
||||
widget.prefix == PrefixEmailAddress.to &&
|
||||
isMatchingEmailList(
|
||||
widget.listEmailAddress,
|
||||
{'emma-reply-to@example.com'},
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user