12345678910111213141516171819202122232425262728293031323334353637 |
-
-
-
- import 'dart:ui';
-
- import 'package:flutter/material.dart';
- import 'package:flutter_test/flutter_test.dart';
- import 'package:zefyr/src/widgets/editable_rich_text.dart';
- import 'package:zefyr/zefyr.dart';
-
- void main() {
- group('$EditableRichText', () {
- final doc = new NotusDocument();
- doc.insert(0, 'This House Is A Circus');
- final text = new TextSpan(text: 'This House Is A Circus');
-
- Widget widget;
- setUp(() {
- widget = new Directionality(
- textDirection: TextDirection.ltr,
- child: new EditableRichText(
- node: doc.root.children.first,
- text: text,
- ),
- );
- });
-
- testWidgets('initialize', (tester) async {
- await tester.pumpWidget(widget);
- EditableRichText result =
- tester.firstWidget(find.byType(EditableRichText));
- expect(result, isNotNull);
- expect(result.text.text, 'This House Is A Circus');
- });
- });
- }
|