@@ -10,7 +10,6 @@ import 'package:devtools_test/helpers.dart';
1010import 'package:flutter/material.dart' ;
1111import 'package:flutter_test/flutter_test.dart' ;
1212
13- import '../../../../test_infra/matchers/matchers.dart' ;
1413import '../../../../test_infra/scenes/memory/default.dart' ;
1514
1615Future <void > pumpScene (WidgetTester tester, MemoryDefaultScene scene) async {
@@ -52,36 +51,17 @@ void main() {
5251 // Check the list contains only documentation item.
5352 expect (snapshots.value.length, equals (1 ));
5453 await pumpScene (tester, scene);
55-
56- // Check initial golden.
57- await expectLater (
58- find.byType (DiffPane ),
59- matchesDevToolsGolden (
60- '../../../../test_infra/goldens/memory_diff_empty1.png' ,
61- ),
62- );
54+ expect (find.byType (DiffPane ), findsOneWidget);
55+ expect (find.byTooltip ('Delete all snapshots' ), findsOneWidget);
6356
6457 // Record three snapshots.
6558 for (final i in Iterable <int >.generate (3 )) {
6659 await takeSnapshot (tester, scene);
6760 expect (find.text ('selected-isolate-${i + 1 }' ), findsOneWidget);
6861 }
6962
70- await expectLater (
71- find.byType (DiffPane ),
72- matchesDevToolsGolden (
73- '../../../../test_infra/goldens/memory_diff_three_snapshots1.png' ,
74- ),
75- );
7663 expect (snapshots.value.length, equals (1 + 3 ));
7764
78- await expectLater (
79- find.byType (DiffPane ),
80- matchesDevToolsGolden (
81- '../../../../test_infra/goldens/memory_diff_selected_class.png' ,
82- ),
83- );
84-
8565 // Delete a snapshot.
8666 await tester.tap (
8767 find.descendant (
@@ -101,24 +81,13 @@ void main() {
10181
10282 // Record snapshot
10383 await takeSnapshot (tester, scene);
104- await expectLater (
105- find.byType (DiffPane ),
106- matchesDevToolsGolden (
107- '../../../../test_infra/goldens/memory_diff_three_snapshots2.png' ,
108- ),
109- );
11084 expect (snapshots.value.length, equals (1 + 3 - 1 + 1 ));
11185
11286 // Clear all
11387 await tester.tap (find.byTooltip ('Delete all snapshots' ));
11488 await tester.pumpAndSettle ();
115- await expectLater (
116- find.byType (DiffPane ),
117- matchesDevToolsGolden (
118- '../../../../test_infra/goldens/memory_diff_empty2.png' ,
119- ),
120- );
12189 expect (snapshots.value.length, equals (1 ));
90+ expect (find.textContaining ('selected-isolate-' ), findsNothing);
12291 });
12392 });
12493}
0 commit comments