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> {
111111extension InlineSpanChecks on Subject <InlineSpan > {
112112 Subject <TextStyle ?> get style => has ((x) => x.style, 'style' );
113113}
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 11import 'dart:io' as io;
22import 'dart:io' ;
33
4+ import 'package:checks/checks.dart' ;
45import 'package:flutter/foundation.dart' ;
56import 'package:flutter/material.dart' ;
67import 'package:flutter/services.dart' ;
@@ -13,6 +14,7 @@ import 'package:zulip/widgets/emoji_reaction.dart';
1314import 'package:zulip/widgets/store.dart' ;
1415
1516import '../example_data.dart' as eg;
17+ import '../flutter_checks.dart' ;
1618import '../model/binding.dart' ;
1719import '../model/test_store.dart' ;
1820import '../test_images.dart' ;
@@ -63,6 +65,10 @@ void main() {
6365
6466 // global store, per-account store
6567 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);
6672 }
6773
6874 // Smoke tests under various conditions.
You can’t perform that action at this time.
0 commit comments