@@ -31,39 +31,39 @@ void testHtml(String name, String htmlData) {
31
31
),
32
32
),
33
33
);
34
- await expectLater (find.byType (Html ), matchesGoldenFile ('./goldens/$name .png' ));
34
+ expect (find.byType (Html ), findsOneWidget);
35
+ // await expectLater(find.byType(Html), matchesGoldenFile('./goldens/$name.png'));
35
36
});
36
37
}
37
38
38
39
void main () {
39
40
//Test each HTML element
40
- // testData.forEach((key, value) {
41
- // testHtml(key, value);
42
- // });
43
- // File.fromUri(Uri(path: './goldens/a.png')).readAsBytesSync();
44
- //
41
+ testData.forEach ((key, value) {
42
+ testHtml (key, value);
43
+ });
44
+
45
45
//Test whitespace processing:
46
- // testWidgets('whitespace golden test', (WidgetTester tester) async {
47
- // await tester.pumpWidget(
48
- // TestApp(
49
- // Html(
50
- // data: """
51
- // <p id='whitespace'>
52
- // These two lines should have an identical length:<br /><br />
53
- //
54
- // The quick <b> brown </b><u><i> fox </i></u> jumped over the
55
- // lazy
56
- //
57
- //
58
- //
59
- //
60
- // dog.<br />
61
- // The quick brown fox jumped over the lazy dog.
62
- // </p>
63
- // """
64
- // ),
65
- // ),
66
- // );
46
+ testWidgets ('whitespace golden test' , (WidgetTester tester) async {
47
+ await tester.pumpWidget (
48
+ TestApp (
49
+ Html (
50
+ data: """
51
+ <p id='whitespace'>
52
+ These two lines should have an identical length:<br /><br />
53
+
54
+ The quick <b> brown </b><u><i> fox </i></u> jumped over the
55
+ lazy
56
+
57
+
58
+
59
+
60
+ dog.<br />
61
+ The quick brown fox jumped over the lazy dog.
62
+ </p>
63
+ """
64
+ ),
65
+ ),
66
+ );
67
67
// await expectLater(find.byType(Html), matchesGoldenFile('./goldens/whitespace.png'));
68
- // });
68
+ });
69
69
}
0 commit comments