test(app): benchmark populated chat Back and document UX review

This commit is contained in:
2026-10-24 11:24:47 +01:00
parent 877c2f1acd
commit ac75da12e4
6 changed files with 197 additions and 3 deletions
@@ -4,6 +4,36 @@ import 'package:flutter_test/flutter_test.dart';
import 'package:pipelines_app/features/chat/ui/transcript/chat_markdown_view.dart';
void main() {
testWidgets('cached markdown still follows system text scaling', (
tester,
) async {
final scale = ValueNotifier<double>(1);
addTearDown(scale.dispose);
await tester.pumpWidget(
ValueListenableBuilder<double>(
valueListenable: scale,
builder: (_, value, _) => MaterialApp(
builder: (context, child) => MediaQuery(
data: MediaQuery.of(
context,
).copyWith(textScaler: TextScaler.linear(value)),
child: child!,
),
home: const Scaffold(
body: ChatMarkdownView(text: 'Scale this answer'),
),
),
),
);
final before = tester.getSize(find.text('Scale this answer')).height;
scale.value = 2;
await tester.pumpAndSettle();
expect(
tester.getSize(find.text('Scale this answer')).height,
greaterThan(before * 1.9),
);
});
testWidgets(
'unchanged markdown retains its rendered subtree across parent updates',
(tester) async {