File tree Expand file tree Collapse file tree 2 files changed +16
-0
lines changed Expand file tree Collapse file tree 2 files changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -111,3 +111,13 @@ extension TypographyChecks on Subject<Typography> {
111
111
extension InlineSpanChecks on Subject <InlineSpan > {
112
112
Subject <TextStyle ?> get style => has ((x) => x.style, 'style' );
113
113
}
114
+
115
+ extension SizeChecks on Subject <Size > {
116
+ Subject <double > get width => has ((x) => x.width, 'width' );
117
+ Subject <double > get height => has ((x) => x.height, 'height' );
118
+ }
119
+
120
+ extension ElementChecks on Subject <Element > {
121
+ Subject <Size ?> get size => has ((t) => t.size, 'size' );
122
+ // TODO more
123
+ }
Original file line number Diff line number Diff line change 1
1
import 'dart:io' as io;
2
2
import 'dart:io' ;
3
3
4
+ import 'package:checks/checks.dart' ;
4
5
import 'package:flutter/foundation.dart' ;
5
6
import 'package:flutter/material.dart' ;
6
7
import 'package:flutter/services.dart' ;
@@ -13,6 +14,7 @@ import 'package:zulip/widgets/emoji_reaction.dart';
13
14
import 'package:zulip/widgets/store.dart' ;
14
15
15
16
import '../example_data.dart' as eg;
17
+ import '../flutter_checks.dart' ;
16
18
import '../model/binding.dart' ;
17
19
import '../model/test_store.dart' ;
18
20
import '../test_images.dart' ;
@@ -63,6 +65,10 @@ void main() {
63
65
64
66
// global store, per-account store
65
67
await tester.pumpAndSettle ();
68
+
69
+ final reactionChipsList = tester.element (find.byType (ReactionChipsList ));
70
+ check (Directionality .of (reactionChipsList)).equals (textDirection);
71
+ check (reactionChipsList).size.isNotNull ().width.equals (width);
66
72
}
67
73
68
74
// Smoke tests under various conditions.
You can’t perform that action at this time.
0 commit comments