Skip to content

Commit b1c6443

Browse files
committed
content test: In prepareContentBare, don't include Scaffold by default
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)".)
1 parent b942ec2 commit b1c6443

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

test/widgets/content_test.dart

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,10 +92,14 @@ void main() {
9292

9393
TestZulipBinding.ensureInitialized();
9494

95-
Future<void> prepareContentBare(WidgetTester tester, String html) async {
95+
Future<void> prepareContentBare(WidgetTester tester, String html, {
96+
bool wrapWithScaffold = false,
97+
}) async {
9698
Widget widget = BlockContentList(nodes: parseContent(html).nodes);
9799

98-
widget = Scaffold(body: widget);
100+
if (wrapWithScaffold) {
101+
widget = Scaffold(body: widget);
102+
}
99103

100104
await tester.pumpWidget(
101105
Builder(builder: (context) =>

0 commit comments

Comments
 (0)