mirror of
https://github.com/AppFlowy-IO/AppFlowy.git
synced 2024-08-30 18:12:39 +00:00
test: add flowy_editor_test into github workflows
This commit is contained in:
parent
d6f1593a20
commit
07ab4c2680
6
.github/workflows/dart_test.yml
vendored
6
.github/workflows/dart_test.yml
vendored
@ -78,9 +78,3 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
flutter pub get
|
flutter pub get
|
||||||
flutter test
|
flutter test
|
||||||
|
|
||||||
- name: Run FlowyEditor tests
|
|
||||||
working-directory: frontend/app_flowy/packages/flowy_editor
|
|
||||||
run: |
|
|
||||||
flutter pub get
|
|
||||||
flutter test
|
|
||||||
|
37
.github/workflows/flowy_editor_test.yml
vendored
Normal file
37
.github/workflows/flowy_editor_test.yml
vendored
Normal file
@ -0,0 +1,37 @@
|
|||||||
|
name: FlowyEditor test
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- "main"
|
||||||
|
|
||||||
|
pull_request:
|
||||||
|
branches:
|
||||||
|
- "main"
|
||||||
|
- "feat/flowy_editor"
|
||||||
|
|
||||||
|
env:
|
||||||
|
CARGO_TERM_COLOR: always
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
tests:
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
os: [macos-latest, ubuntu-latest, windows-latest]
|
||||||
|
|
||||||
|
runs-on: ${{ matrix.os }}
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
|
||||||
|
- uses: subosito/flutter-action@v2
|
||||||
|
with:
|
||||||
|
channel: 'stable'
|
||||||
|
flutter-version: '3.0.5'
|
||||||
|
cache: true
|
||||||
|
|
||||||
|
- name: Run FlowyEditor tests
|
||||||
|
working-directory: frontend/app_flowy/packages/flowy_editor
|
||||||
|
run: |
|
||||||
|
flutter pub get
|
||||||
|
flutter test
|
@ -86,7 +86,7 @@ FlowyKeyEventHandler enterWithoutShiftInTextNodesHandler =
|
|||||||
);
|
);
|
||||||
TransactionBuilder(editorState)
|
TransactionBuilder(editorState)
|
||||||
..insertNode(
|
..insertNode(
|
||||||
textNode.path.next,
|
textNode.path,
|
||||||
TextNode.empty(),
|
TextNode.empty(),
|
||||||
)
|
)
|
||||||
..afterSelection = afterSelection
|
..afterSelection = afterSelection
|
||||||
|
@ -71,10 +71,6 @@ void main() async {
|
|||||||
expect(lastNode != null, true);
|
expect(lastNode != null, true);
|
||||||
expect(lastNode is TextNode, true);
|
expect(lastNode is TextNode, true);
|
||||||
lastNode = lastNode as TextNode;
|
lastNode = lastNode as TextNode;
|
||||||
for (final node in editor.root.children) {
|
|
||||||
print(
|
|
||||||
'path = ${node.path}, text = ${(node as TextNode).toRawString()}');
|
|
||||||
}
|
|
||||||
expect(lastNode.delta.toRawString(), text);
|
expect(lastNode.delta.toRawString(), text);
|
||||||
expect((lastNode.previous as TextNode).delta.toRawString(), '');
|
expect((lastNode.previous as TextNode).delta.toRawString(), '');
|
||||||
expect(
|
expect(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user