|
@@ -2,6 +2,7 @@ import 'package:appflowy/plugins/database_view/widgets/row/row_banner.dart';
|
|
|
import 'package:appflowy_backend/protobuf/flowy-database2/field_entities.pbenum.dart';
|
|
|
import 'package:appflowy_editor/appflowy_editor.dart';
|
|
|
import 'package:flowy_infra_ui/style_widget/text.dart';
|
|
|
+import 'package:flutter/material.dart';
|
|
|
import 'package:flutter_test/flutter_test.dart';
|
|
|
import 'package:integration_test/integration_test.dart';
|
|
|
|
|
@@ -194,6 +195,48 @@ void main() {
|
|
|
);
|
|
|
});
|
|
|
|
|
|
+ testWidgets(
|
|
|
+ 'check if the title wraps properly when a long text is inserted',
|
|
|
+ (tester) async {
|
|
|
+ await tester.initializeAppFlowy();
|
|
|
+ await tester.tapGoButton();
|
|
|
+
|
|
|
+ // Create a new grid
|
|
|
+ await tester.tapAddButton();
|
|
|
+ await tester.tapCreateGridButton();
|
|
|
+
|
|
|
+ // Hover first row and then open the row page
|
|
|
+ await tester.openFirstRowDetailPage();
|
|
|
+
|
|
|
+ // Wait for the document to be loaded
|
|
|
+ await tester.wait(500);
|
|
|
+
|
|
|
+ // Focus on the editor
|
|
|
+ final textField = find
|
|
|
+ .descendant(
|
|
|
+ of: find.byType(SimpleDialog),
|
|
|
+ matching: find.byType(TextField),
|
|
|
+ )
|
|
|
+ .first;
|
|
|
+
|
|
|
+ // Input a long text
|
|
|
+ await tester.enterText(textField, 'Long text' * 25);
|
|
|
+ await tester.pumpAndSettle();
|
|
|
+
|
|
|
+ // Tap outside to dismiss the field
|
|
|
+ await tester.tapAt(Offset.zero);
|
|
|
+ await tester.pumpAndSettle();
|
|
|
+
|
|
|
+ // Check if there is any overflow in the widget tree
|
|
|
+ expect(tester.takeException(), isNull);
|
|
|
+
|
|
|
+ // Re-open the document
|
|
|
+ await tester.openFirstRowDetailPage();
|
|
|
+
|
|
|
+ // Check again if there is any overflow in the widget tree
|
|
|
+ expect(tester.takeException(), isNull);
|
|
|
+ });
|
|
|
+
|
|
|
testWidgets('delete row in row detail page', (tester) async {
|
|
|
await tester.initializeAppFlowy();
|
|
|
await tester.tapGoButton();
|