浏览代码

chore: delete legacy test file

Lucas.Xu 2 年之前
父节点
当前提交
e508d7414c

+ 1 - 1
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)));

+ 0 - 39
frontend/app_flowy/packages/flowy_editor/test/editor/widget_test.dart

@@ -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);
-  });
-}