@@ -31,39 +31,39 @@ void testHtml(String name, String htmlData) {
3131 ),
3232 ),
3333 );
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'));
3536 });
3637}
3738
3839void main () {
3940 //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+
4545 //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+ );
6767// await expectLater(find.byType(Html), matchesGoldenFile('./goldens/whitespace.png'));
68- // });
68+ });
6969}
0 commit comments