fix(flutter): 选集条箭头靠右排列
This commit is contained in:
1 parent
ced0fae64a
commit
90769de3b7
2 files changed
+26
-2
No files matched your search
@@ -286,6 +286,30 @@ void main() {
|
||||
expect(find.byKey(const Key('player-interaction-rail')), findsOneWidget);
|
||||
});
|
||||
|
||||
testWidgets('should_push_episodes_arrow_to_pill_right', (tester) async {
|
||||
// 宽屏下文案不会撑满胶囊,才能验证箭头是否被推到最右侧。
|
||||
await _pumpApp(tester, size: const Size(900, 844));
|
||||
await _openSeriesPlayer(tester);
|
||||
|
||||
final pill = tester.getRect(find.byKey(const Key('player-episodes-pill')));
|
||||
final label = tester.getRect(
|
||||
find
|
||||
.descendant(
|
||||
of: find.byKey(const Key('player-episodes-pill')),
|
||||
matching: find.byType(Text),
|
||||
)
|
||||
.first,
|
||||
);
|
||||
final arrow = tester.getRect(
|
||||
find.descendant(
|
||||
of: find.byKey(const Key('player-episodes-pill')),
|
||||
matching: find.byIcon(Icons.keyboard_arrow_up_rounded),
|
||||
),
|
||||
);
|
||||
expect(pill.right - arrow.right, closeTo(14, 0.5));
|
||||
expect(arrow.left - label.right, closeTo(8, 0.5));
|
||||
});
|
||||
|
||||
testWidgets('should_show_rail_counts_from_detail_and_follow_server_results', (
|
||||
tester,
|
||||
) async {
|
||||
|
||||
Reference in new issue
Block a user