TF-3563 Add integration test for case view inline image in EmailView

This commit is contained in:
dab246
2025-03-18 10:45:47 +07:00
committed by Dat H. Pham
parent 5ef01d299f
commit 8de206e555
5 changed files with 149 additions and 0 deletions
@@ -21,6 +21,7 @@ import 'package:tmail_ui_user/features/composer/presentation/widgets/recipient_s
import 'package:tmail_ui_user/features/composer/presentation/widgets/subject_composer_widget.dart';
import 'package:tmail_ui_user/features/upload/domain/state/local_image_picker_state.dart';
import 'package:tmail_ui_user/main/localizations/app_localizations.dart';
import 'package:tmail_ui_user/main/routes/route_navigation.dart';
import '../base/core_robot.dart';
import '../extensions/patrol_finder_extension.dart';
@@ -168,4 +169,19 @@ class ComposerRobot extends CoreRobot {
.which<PopupItemWidget>((widget) => widget.iconAction == ImagePaths().icReadReceipt)
.tap();
}
Future<void> addInlineImageFromFile(File file) async {
final controller = getBinding<ComposerController>();
final filePath = file.path;
final fileSize = await file.length();
final fileName = filePath.split('/').last;
final fileInfo = FileInfo(
filePath: filePath,
fileSize: fileSize,
fileName: fileName,
);
controller?.handleSuccessViewState(LocalImagePickerSuccess(fileInfo));
}
}