Skip to content

Commit

Permalink
emoji_reaction test: Add another convenient test-setup check
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisbobbe authored and gnprice committed Jul 26, 2024
1 parent 5605e2e commit ae476b2
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
5 changes: 5 additions & 0 deletions test/flutter_checks.dart
Original file line number Diff line number Diff line change
Expand Up @@ -121,3 +121,8 @@ extension ElementChecks on Subject<Element> {
Subject<Size?> get size => has((t) => t.size, 'size');
// TODO more
}

extension MediaQueryDataChecks on Subject<MediaQueryData> {
Subject<TextScaler> get textScaler => has((x) => x.textScaler, 'textScaler');
// TODO more
}
2 changes: 2 additions & 0 deletions test/widgets/emoji_reaction_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,8 @@ void main() {
await setupChipsInBox(tester, reactions: reactions);

final reactionChipsList = tester.element(find.byType(ReactionChipsList));
check(MediaQuery.of(reactionChipsList))
.textScaler.equals(TextScaler.linear(textScaleFactor));
check(Directionality.of(reactionChipsList)).equals(textDirection);

// TODO(upstream) Do these in an addTearDown, once we can:
Expand Down

0 comments on commit ae476b2

Please sign in to comment.