File tree Expand file tree Collapse file tree 1 file changed +10
-7
lines changed
Expand file tree Collapse file tree 1 file changed +10
-7
lines changed Original file line number Diff line number Diff line change @@ -37,11 +37,15 @@ class WidgetHooks implements Hook {
3737
3838 @override
3939 Future <void > onAfterStep (World world, String step, StepResult stepResult) async {
40- if ([StepExecutionResult .fail, StepExecutionResult .error].contains (stepResult.result)) {
41- var dumpFileName = _getDumpFilePath ();
42- currentWorld.dumpFile = File ("$dumpFileName .txt" );
43- currentWorld.screenshot = File ("$dumpFileName .png" );
44- await takeScreenshot (withWidgetTreeRender: true );
40+ try {
41+ if ([StepExecutionResult .fail, StepExecutionResult .error].contains (stepResult.result)) {
42+ var dumpFileName = _getDumpFilePath ();
43+ currentWorld.dumpFile = File ("$dumpFileName .txt" );
44+ currentWorld.screenshot = File ("$dumpFileName .png" );
45+ await takeScreenshot (withWidgetTreeRender: true );
46+ }
47+ } catch (e) {
48+ throwsAssertionError;
4549 }
4650 }
4751
@@ -60,8 +64,7 @@ class WidgetHooks implements Hook {
6064 await disposeWidget ();
6165 currentWorld.dispose ();
6266 } catch (e) {
63- log (e.toString ());
64- rethrow ;
67+ throwsAssertionError;
6568 }
6669 }
6770}
You can’t perform that action at this time.
0 commit comments