@@ -290,23 +290,38 @@ void main() {
290290 expect (find.text (ReportMessages .appReportMerged (7 )), findsOneWidget);
291291 });
292292
293- testSnack ('נשמר בתור — הודעת queued' , (tester) async {
294- await pumpDialog (
293+ for (final scenario in [
294+ (
295+ schema: 1 ,
296+ message: 'הדיווח נשמר בתור לשליחה. ניתן לנהל או לייצא אותו בהגדרות.' ,
297+ ),
298+ (schema: 2 , message: ReportMessages .extendedReportQueued),
299+ ]) {
300+ testSnack ('נשמר בתור — הודעת queued עבור schema ${scenario .schema }' , (
295301 tester,
296- withService: FakeAppReportService (
297- respond: (r) => AppReportDeliveryResult (
298- status: AppReportDeliveryStatus .queued,
299- report: r,
302+ ) async {
303+ await pumpDialog (
304+ tester,
305+ withService: FakeAppReportService (
306+ respond: (r) => AppReportDeliveryResult (
307+ status: AppReportDeliveryStatus .queued,
308+ report: r.copyWith (schema: scenario.schema),
309+ ),
300310 ),
301- ),
302- );
303- await fill (tester);
304- await send (tester);
305- expect (
306- find.text ('הדיווח נשמר בתור לשליחה. ניתן לנהל או לייצא אותו בהגדרות.' ),
307- findsOneWidget,
308- );
309- });
311+ );
312+ await fill (tester);
313+ await send (tester);
314+ expect (find.byType (AppReportDialog ), findsNothing);
315+ expect (popped, isNotNull);
316+ expect (popped! .status, AppReportDeliveryStatus .queued);
317+ expect (service.sent.single.schema, AppReport .schemaVersion);
318+ expect (
319+ popped! .report.toJson (),
320+ service.sent.single.copyWith (schema: scenario.schema).toJson (),
321+ );
322+ expect (find.text (scenario.message), findsOneWidget);
323+ });
324+ }
310325
311326 testSnack ('נדחה בשרת — הודעת שגיאה עם השדה' , (tester) async {
312327 await pumpDialog (
0 commit comments