forked from zulip/zulip-flutter
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
content tests [nfc]: Deduplicate ad-hoc content-preparing code
It should now be easy to drop in natural dependencies of our content widgets, such as a ThemeExtension for custom light- and dark-theme custom colors, for all the tests of our Zulip content widgets. To do that, we can just add unconditional code to this function. It should also help us keep being explicit about some potentially problematic dependencies, which will be handy when we work on zulip#488 ("content: Support Zulip content outside messages (even outside per-account contexts)"). After this change, some ad-hoc `tester.pumpWidget` calls do remain in this file; see tests of RealmContentNetworkImage and AvatarImage. But those aren't "Zulip content widgets" in the same sense as most of the widgets in lib/widgets/content.dart, which are used exclusively to render parsed Zulip Markdown. (There isn't even any Zulip Markdown that would produce an AvatarImage.) So, leave them be. Perhaps these widgets belong in some other file. Related: zulip#95 Related: zulip#488
- Loading branch information
1 parent
431aa4c
commit cc8c9fe
Showing
1 changed file
with
49 additions
and
116 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters