Skip to content

Commit

Permalink
content test: In prepareContentBare, don't include Scaffold by default
Browse files Browse the repository at this point in the history
None of our content widgets currently depend on a Scaffold. It's not
necessarily bad if they do -- but if it ever happens, it'll be
helpful to be explicit about it, and using this param would be a way
to get that explicitness. (I assume the explicitness would be
helpful when we do zulip#488, "content: Support Zulip content outside
messages (even outside per-account contexts)".)
  • Loading branch information
chrisbobbe committed May 13, 2024
1 parent b942ec2 commit b1c6443
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions test/widgets/content_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -92,10 +92,14 @@ void main() {

TestZulipBinding.ensureInitialized();

Future<void> prepareContentBare(WidgetTester tester, String html) async {
Future<void> prepareContentBare(WidgetTester tester, String html, {
bool wrapWithScaffold = false,
}) async {
Widget widget = BlockContentList(nodes: parseContent(html).nodes);

widget = Scaffold(body: widget);
if (wrapWithScaffold) {
widget = Scaffold(body: widget);
}

await tester.pumpWidget(
Builder(builder: (context) =>
Expand Down

0 comments on commit b1c6443

Please sign in to comment.