diff --git a/test/plugins/html/html_document_test.dart b/test/plugins/html/html_document_test.dart index 148756bab..3eb700ab6 100644 --- a/test/plugins/html/html_document_test.dart +++ b/test/plugins/html/html_document_test.dart @@ -369,7 +369,7 @@ void main() { ); }); - test('sample 13', () { + test('sample 13 - copy divider and headings from ChatGPT', () { const html = '''

Sales Performance Report - Q4 2024

This report provides an overview of the sales performance for the fourth quarter of 2024, including revenue, product performance, and regional sales comparison.


'''; final document = htmlToDocument(html); @@ -378,4 +378,56 @@ void main() { expect(document.nodeAtPath([1])!.type, ParagraphBlockKeys.type); expect(document.nodeAtPath([2])!.type, DividerBlockKeys.type); }); + + test('sample 14 - copy table from ChatGPT', () { + const html = ''' + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
RegionTotal Sales (in \$)Sales Growth (%)Best Performing Product
North America5,200,0008.5Product A
Europe3,800,0006.2Product B
Asia-Pacific2,500,00010.1Product C
Latin America1,200,0004.0Product A
Middle East950,00012.5Product D
+'''; + final document = htmlToDocument(html); + final table = document.nodeAtPath([0])!; + expect(table.type, TableBlockKeys.type); + + print(table.toJson()); + }); }