Skip to content

Bring projects, wikis, and teams together with AI. AppFlowy is the AI collaborative workspace where you achieve more without losing control of your data. The leading open source Notion alternative.

chore: delete legacy test file

Lucas.Xue508d7414c3c
diff --git a/frontend/app_flowy/packages/flowy_editor/test/editor/key_event_tests/enter_without_shift_in_text_node_handler_test.dart b/frontend/app_flowy/packages/flowy_editor/test/editor/key_event_tests/enter_without_shift_in_text_node_handler_test.dart
index 5dd8c3dad0..661862416b 100644
--- a/frontend/app_flowy/packages/flowy_editor/test/editor/key_event_tests/enter_without_shift_in_text_node_handler_test.dart
+++ b/frontend/app_flowy/packages/flowy_editor/test/editor/key_event_tests/enter_without_shift_in_text_node_handler_test.dart
@@ -52,7 +52,7 @@ void main() async {
LogicalKeyboardKey.enter,
);
lines += 1;
-
+ await tester.pumpAndSettle(const Duration(microseconds: 500));
expect(editor.documentLength, lines);
expect(editor.documentSelection,
Selection.collapsed(Position(path: [lines - 1], offset: 0)));
diff --git a/frontend/app_flowy/packages/flowy_editor/test/editor/widget_test.dart b/frontend/app_flowy/packages/flowy_editor/test/editor/widget_test.dart
deleted file mode 100644
index 1291778a56..0000000000
--- a/frontend/app_flowy/packages/flowy_editor/test/editor/widget_test.dart
+++ /dev/null
@@ -1,39 +0,0 @@
-import 'dart:convert';
-import 'dart:io';
-
-import 'package:flowy_editor/flowy_editor.dart';
-import 'package:flutter/material.dart';
-import 'package:flutter/services.dart';
-import 'package:flutter_test/flutter_test.dart';
-
-import '../infra/test_raw_key_event.dart';
-
-void main() async {
- final file = File('test_assets/example.json');
- final json = jsonDecode(await file.readAsString());
- print(json);
-
- setUpAll(() {
- TestWidgetsFlutterBinding.ensureInitialized();
- });
-
- testWidgets('init FlowyEditor ', (tester) async {
- final editorState = EditorState(
- document: StateTree.fromJson(json),
- );
- final flowyEditor = FlowyEditor(editorState: editorState);
- await tester.pumpWidget(MaterialApp(
- home: flowyEditor,
- ));
- editorState.service.selectionService
- .updateSelection(Selection.collapsed(Position(path: [0], offset: 1)));
- await tester.pumpAndSettle();
- final key = const TestRawKeyEventData(
- logicalKey: LogicalKeyboardKey.enter,
- physicalKey: PhysicalKeyboardKey.enter,
- ).toKeyEvent;
- editorState.service.keyboardService!.onKey(key);
- await tester.pumpAndSettle();
- expect(editorState.document.root.children.length, 2);
- });
-}