diff --git a/example/integration_test/integration_test.dart b/example/integration_test/integration_test.dart index 43a2bd2a..504accc4 100644 --- a/example/integration_test/integration_test.dart +++ b/example/integration_test/integration_test.dart @@ -2,7 +2,7 @@ import 'dart:io' show Platform; -import 'package:flutter/material.dart' show Key; +import 'package:flutter/material.dart'; import 'package:flutter_test/flutter_test.dart'; import 'package:integration_test/integration_test.dart'; @@ -40,6 +40,9 @@ void execute(String key) => testWidgets(key, (tester) async { await tester.tap(button); await tester.pumpAndSettle(); + + debugPrint('$key returned: ${app.logger.value}'); + if (app.logger.error == null) return; fail( "${app.logger.error.runtimeType}: ${app.logger.error}\nStackTrace: ${app.logger.stackTrace}"); diff --git a/example/integration_test/test_app.dart b/example/integration_test/test_app.dart index b244bb76..560ff78c 100644 --- a/example/integration_test/test_app.dart +++ b/example/integration_test/test_app.dart @@ -82,7 +82,7 @@ class _AppState extends State { logger = Logger(); setState(() => isTesting = true); try { - await onPressed(); + logger.value = await onPressed(); } catch (e, st) { logger.error = e; logger.stackTrace = e is GalException ? e.stackTrace : st; @@ -105,6 +105,7 @@ class _AppState extends State { } class Logger { + dynamic value; Object? error; StackTrace? stackTrace; }