TF-4301 Add E2E tests for label creation and tagging from email view

This commit is contained in:
dab246
2026-03-06 19:08:20 +07:00
committed by Dat H. Pham
parent 190ccc7bc3
commit 1b62990f28
15 changed files with 135 additions and 49 deletions
+4
View File
@@ -51,6 +51,10 @@ class EmailRobot extends CoreRobot {
await $(AppLocalizations().starred).tap();
}
Future<void> tapEmailDetailedLabelAsOptionInContextMenu() async {
await $(#labelAs_action).tap();
}
Future<void> tapEmailDetailedUnstarButton() async {
await $(AppLocalizations().not_starred).tap();
}
@@ -1,14 +0,0 @@
import 'package:flutter_test/flutter_test.dart';
import 'package:tmail_ui_user/features/base/widget/context_menu/context_menu_dialog_item.dart';
import '../base/core_robot.dart';
class LabelListContextMenuRobot extends CoreRobot {
LabelListContextMenuRobot(super.$);
Future<void> selectLabelByName(String name) async {
final item = $(ContextMenuDialogItem).$(name);
await $.scrollUntilVisible(finder: item);
await item.tap();
}
}
-14
View File
@@ -1,14 +0,0 @@
import 'package:flutter_test/flutter_test.dart';
import 'package:tmail_ui_user/features/mailbox/presentation/widgets/labels/label_list_item.dart';
import '../base/core_robot.dart';
class LabelRobot extends CoreRobot {
LabelRobot(super.$);
Future<void> openLabelByName(String name) async {
final item = $(LabelListItem).$(name);
await $.scrollUntilVisible(finder: item);
await item.tap();
}
}
@@ -0,0 +1,11 @@
import 'package:flutter_test/flutter_test.dart';
import '../../base/core_robot.dart';
class AddLabelModalRobot extends CoreRobot {
AddLabelModalRobot(super.$);
Future<void> tapCreateANewLabel() async {
await $(#create_a_new_label_button).tap();
}
}
@@ -15,4 +15,10 @@ class LabelRobot extends CoreRobot {
Future<void> tapCreateNewLabelButton() async {
await $(#labels_bar_widget_add_new_label_button).tap();
}
Future<void> openLabelByName(String name) async {
final item = $(LabelListItem).$(name);
await $.scrollUntilVisible(finder: item);
await item.tap();
}
}