Files
buzz/mobile/test/features/channels/camera_capture_cleanup_test.dart
klopez4212 8398468ec9 Refine the mobile message composer (#2730)
## Summary
- replace the mobile composer sheet with a compact expanding capsule
- add vertically stacked attachment actions and an inline camera preview
- align suggestion, formatting, and send treatments with desktop

## Validation
- `just mobile-check`
- `just mobile-test` (541 passed, 1 skipped)

---------

Signed-off-by: npub102wg7q285p64ch2fjvstmf2ntn2sz3c4u5hmwatalc76mhsuauysftjtfj <7a9c8f0147a0755c5d499320bda5535cd5014715e52fb7757dfe3dadde1cef09@buzz.block.builderlab.xyz>
Co-authored-by: npub102wg7q285p64ch2fjvstmf2ntn2sz3c4u5hmwatalc76mhsuauysftjtfj <7a9c8f0147a0755c5d499320bda5535cd5014715e52fb7757dfe3dadde1cef09@buzz.block.builderlab.xyz>
2026-07-24 16:32:22 -07:00

36 lines
1013 B
Dart

import 'dart:io';
import 'package:flutter_test/flutter_test.dart';
import 'package:image_picker/image_picker.dart';
import 'package:buzz/features/channels/camera_capture_cleanup.dart';
void main() {
test('deletes the inline camera file after upload succeeds', () async {
final file = File(
'${Directory.systemTemp.path}/buzz-camera-${DateTime.now().microsecondsSinceEpoch}.jpg',
);
await file.writeAsBytes([1, 2, 3]);
await processCapturedImage(XFile(file.path), (_) async {});
expect(await file.exists(), isFalse);
});
test('deletes the inline camera file when upload fails', () async {
final file = File(
'${Directory.systemTemp.path}/buzz-camera-${DateTime.now().microsecondsSinceEpoch}.jpg',
);
await file.writeAsBytes([1, 2, 3]);
await expectLater(
processCapturedImage(
XFile(file.path),
(_) async => throw Exception('upload failed'),
),
throwsException,
);
expect(await file.exists(), isFalse);
});
}