fix(player): 评论入口文字垂直居中

This commit is contained in:
Zhou Weidong committed 2026-10-21 13:16:34 +08:00
1 parent 146cd2a29e
commit f87b0d2689
2 files changed
+57 -12

No files matched your search

@@ -109,6 +109,16 @@ void main() {
final input = find.byKey(const Key('comment-input'));
expect(input, findsOneWidget);
expect(tester.widget<TextField>(input).focusNode?.hasFocus, isTrue);
expect(
tester.widget<TextField>(input).textAlignVertical,
TextAlignVertical.center,
);
await tester.enterText(input, 'First line\nSecond line');
await tester.pump();
final multilineField = tester.widget<TextField>(input);
expect(multilineField.textAlignVertical, TextAlignVertical.top);
expect(multilineField.style?.height, 1.4);
});
testWidgets('should_gate_guest_post_without_creating_comment', (
@@ -492,6 +502,17 @@ void main() {
tester.getSize(find.byKey(const Key('comment-input-placeholder'))).height,
44,
);
final placeholderLabel = find.byKey(
const Key('comment-input-placeholder-label'),
);
final placeholderSendIcon = find.descendant(
of: find.byKey(const Key('comment-post')),
matching: find.byIcon(Icons.send_rounded),
);
expect(
tester.getCenter(placeholderLabel).dy,
closeTo(tester.getCenter(placeholderSendIcon).dy, 1),
);
expect(find.byKey(const Key('player-comments-drag-handle')), findsNothing);
expect(
tester.getSize(find.byKey(const Key('player-comments-close'))),