From 182b78f2bbda742a3e2efae706e99d5e17426fc7 Mon Sep 17 00:00:00 2001 From: Amir Panahandeh Date: Thu, 15 Aug 2024 23:20:49 +0330 Subject: [PATCH] Run perf tests for longer --- .../example/integration_test/editing_test.dart | 6 ++++-- .../example/integration_test/scrolling_test.dart | 12 +++++++++--- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/packages/fleather/example/integration_test/editing_test.dart b/packages/fleather/example/integration_test/editing_test.dart index 73075b5c..b8de03fd 100644 --- a/packages/fleather/example/integration_test/editing_test.dart +++ b/packages/fleather/example/integration_test/editing_test.dart @@ -24,14 +24,16 @@ void main() { controller.updateSelection( TextSelection.collapsed(offset: document.length - 1)); await tester.pump(); - await tester.ime - .typeText('Hello, World!', finder: find.byType(RawEditor)); + await tester.ime.typeText(iputText, finder: find.byType(RawEditor)); }, reportKey: 'editing_timeline', ); }); } +final iputText = + 'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.'; + final markdown = ''' # Fleather diff --git a/packages/fleather/example/integration_test/scrolling_test.dart b/packages/fleather/example/integration_test/scrolling_test.dart index 601dadde..00a50ad3 100644 --- a/packages/fleather/example/integration_test/scrolling_test.dart +++ b/packages/fleather/example/integration_test/scrolling_test.dart @@ -22,9 +22,15 @@ void main() { await binding.traceAction( () async { - while (scrollController.position.extentAfter != 0) { - await tester.drag(scrollableFinder, const Offset(0, -200)); - await tester.pump(); + for (var i = 0; i < 10; i++) { + while (scrollController.position.extentAfter != 0) { + await tester.drag(scrollableFinder, const Offset(0, -200)); + await tester.pump(); + } + while (scrollController.position.extentBefore != 0) { + await tester.drag(scrollableFinder, const Offset(0, 200)); + await tester.pump(); + } } }, reportKey: 'scrolling_timeline',