* chore: revert "fix: word boundary regards white space as a word (#1157)"
This reverts commit a1f1c6708a.
* chore: remove test
---------
Co-authored-by: Lucas.Xu <lucas.xu@appflowy.io>
This commit is contained in:
parent
cf0907738c
commit
2dbc203b14
1 changed files with 2 additions and 86 deletions
|
|
@ -54,38 +54,6 @@ void main() async {
|
|||
await editor.dispose();
|
||||
});
|
||||
|
||||
testWidgets('context menu cut test ', (tester) async {
|
||||
const text = 'Welcome to AppFlowy';
|
||||
final editor = tester.editor..addParagraph(initialText: text);
|
||||
await editor.startTesting();
|
||||
expect(
|
||||
find.text(text, findRichText: true),
|
||||
findsOneWidget,
|
||||
);
|
||||
await editor.updateSelection(
|
||||
Selection(
|
||||
start: Position(path: [0], offset: 0),
|
||||
end: Position(path: [0], offset: 18),
|
||||
),
|
||||
);
|
||||
final copiedText =
|
||||
editor.editorState.getTextInSelection(editor.selection).join('/n');
|
||||
final position = tester.getCenter(find.text(text, findRichText: true));
|
||||
rightClickAt(position);
|
||||
await tester.pump();
|
||||
final cutButton = find.text('Cut');
|
||||
expect(cutButton, findsOneWidget);
|
||||
await tester.tap(cutButton);
|
||||
await tester.pumpAndSettle(const Duration(milliseconds: 500));
|
||||
expect(
|
||||
find.text('Welcome to AppFlowy', findRichText: true),
|
||||
findsNothing,
|
||||
);
|
||||
final clipBoardData = await AppFlowyClipboard.getData();
|
||||
expect(clipBoardData.text, copiedText);
|
||||
await editor.dispose();
|
||||
});
|
||||
|
||||
testWidgets('context menu copy and paste test', (tester) async {
|
||||
const text = 'Welcome to AppFlowy';
|
||||
final editor = tester.editor
|
||||
|
|
|
|||
Loading…
Reference in a new issue