E2E Fix integration test Twake Mail v0.18.4

E2E Fix integration test Twake Mail v0.18.4
This commit is contained in:
Dang Dat
2025-09-09 10:22:14 +07:00
committed by Dat H. Pham
parent fb53ba6568
commit c6ace7a9b5
29 changed files with 97 additions and 114 deletions
@@ -27,10 +27,11 @@ class ComposerUploadAttachmentAndInlineImageScenario extends BaseTestScenario {
final png = await preparingPngWithName(pngName);
await composerRobot.addAttachment(png);
await $.pumpAndSettle();
await _expectAttachment(pngName);
await composerRobot.addInline(png);
await $.pumpAndSettle();
_expectAttachment(pngName);
await _expectInline();
await composerRobot.addAttachment(png);
@@ -50,13 +51,11 @@ class ComposerUploadAttachmentAndInlineImageScenario extends BaseTestScenario {
);
}
void _expectAttachment(String pngName) {
return expect(
$(AttachmentItemComposerWidget)
.which<AttachmentItemComposerWidget>(
(widget) => widget.fileName.contains(pngName)
),
findsOneWidget,
Future<void> _expectAttachment(String pngName) async {
await expectViewVisible(
$(AttachmentItemComposerWidget).which<AttachmentItemComposerWidget>(
(widget) => widget.fileName.contains(pngName),
),
);
}