Anatoly Pulyaevskiy hace 5 años
padre
commit
b83949b491

+ 1
- 0
packages/notus/tool/travis.sh Ver fichero

@@ -5,5 +5,6 @@ set -e
5 5
 pub get
6 6
 pub run test -r expanded
7 7
 dartfmt -n --set-exit-if-changed lib/
8
+dartfmt -n --set-exit-if-changed test/
8 9
 dartanalyzer --fatal-infos --fatal-warnings .
9 10
 pub run test_coverage

+ 1
- 1
packages/zefyr/test/rendering/render_zefyr_paragraph_test.dart Ver fichero

@@ -38,4 +38,4 @@ void main() {
38 38
       expect(renderContext.active, contains(p));
39 39
     }, skip: 'TODO: move to RenderEditableProxyBox');
40 40
   });
41
-}
41
+}

+ 3
- 8
packages/zefyr/test/widgets/controller_test.dart Ver fichero

@@ -58,8 +58,7 @@ void main() {
58 58
       expect(notified, isTrue);
59 59
       var expectedSelection = TextSelection.collapsed(offset: 10);
60 60
       expect(controller.selection, expectedSelection);
61
-      expect(
62
-          controller.document.toDelta(), Delta()..insert('More Words\n'));
61
+      expect(controller.document.toDelta(), Delta()..insert('More Words\n'));
63 62
       expect(controller.lastChangeSource, ChangeSource.remote);
64 63
     });
65 64
 
@@ -86,9 +85,7 @@ void main() {
86 85
       expect(notified, isTrue);
87 86
       expect(
88 87
         controller.document.toDelta(),
89
-        Delta()
90
-          ..insert('Words', NotusAttribute.bold.toJson())
91
-          ..insert('\n'),
88
+        Delta()..insert('Words', NotusAttribute.bold.toJson())..insert('\n'),
92 89
       );
93 90
       expect(controller.lastChangeSource, ChangeSource.local);
94 91
     });
@@ -104,9 +101,7 @@ void main() {
104 101
       expect(notified, isTrue);
105 102
       expect(
106 103
         controller.document.toDelta(),
107
-        Delta()
108
-          ..insert('Words', NotusAttribute.bold.toJson())
109
-          ..insert('\n'),
104
+        Delta()..insert('Words', NotusAttribute.bold.toJson())..insert('\n'),
110 105
       );
111 106
       expect(controller.lastChangeSource, ChangeSource.local);
112 107
     });

+ 1
- 2
packages/zefyr/test/widgets/editor_test.dart Ver fichero

@@ -20,8 +20,7 @@ void main() {
20 20
         ..insert('\n');
21 21
       var doc = NotusDocument.fromDelta(delta);
22 22
       var theme = ZefyrThemeData(linkStyle: TextStyle(color: Colors.red));
23
-      var editor =
24
-          EditorSandBox(tester: tester, document: doc, theme: theme);
23
+      var editor = EditorSandBox(tester: tester, document: doc, theme: theme);
25 24
       await editor.pumpAndTap();
26 25
       // TODO: figure out why this extra pump is needed here
27 26
       await tester.pumpAndSettle();

+ 1
- 2
packages/zefyr/test/widgets/horizontal_rule_test.dart Ver fichero

@@ -48,8 +48,7 @@ void main() {
48 48
       expect(editor.selection.extentOffset, embed.documentOffset + 1);
49 49
     });
50 50
 
51
-    testWidgets('selects on long press',
52
-        (tester) async {
51
+    testWidgets('selects on long press', (tester) async {
53 52
       final editor = EditorSandBox(tester: tester);
54 53
       await editor.pumpAndTap();
55 54
       await editor.tapButtonWithIcon(Icons.remove);

+ 1
- 2
packages/zefyr/test/widgets/rich_text_test.dart Ver fichero

@@ -27,8 +27,7 @@ void main() {
27 27
 
28 28
     testWidgets('initialize', (tester) async {
29 29
       await tester.pumpWidget(widget);
30
-      ZefyrRichText result =
31
-          tester.firstWidget(find.byType(ZefyrRichText));
30
+      ZefyrRichText result = tester.firstWidget(find.byType(ZefyrRichText));
32 31
       expect(result, isNotNull);
33 32
       expect(result.text.text, 'This House Is A Circus');
34 33
     });

+ 1
- 2
packages/zefyr/test/widgets/selection_test.dart Ver fichero

@@ -37,8 +37,7 @@ void main() {
37 37
     testWidgets('tap on padding area finds closest paragraph', (tester) async {
38 38
       final editor = EditorSandBox(tester: tester);
39 39
       await editor.pumpAndTap();
40
-      editor.controller
41
-          .updateSelection(TextSelection.collapsed(offset: 10));
40
+      editor.controller.updateSelection(TextSelection.collapsed(offset: 10));
42 41
       await tester.pumpAndSettle();
43 42
       expect(editor.controller.selection.extentOffset, 10);
44 43
 

+ 3
- 0
packages/zefyr/tool/travis.sh Ver fichero

@@ -3,3 +3,6 @@
3 3
 set -e
4 4
 
5 5
 $TRAVIS_BUILD_DIR/flutter/bin/flutter test
6
+
7
+dartfmt -n --set-exit-if-changed lib/
8
+dartfmt -n --set-exit-if-changed test/