fix(player): 改为显式清屏交互
This commit is contained in:
1 parent
f4e1a5424e
commit
f613033088
12 files changed
+158
-166
No files matched your search
@@ -5,16 +5,14 @@ import 'package:flutter_test/flutter_test.dart';
|
||||
import 'package:fruitshorts/pages/player/widgets/player_center_toggle.dart';
|
||||
|
||||
void main() {
|
||||
testWidgets('should_use_one_shared_52px_style_for_home_and_player', (
|
||||
tester,
|
||||
) async {
|
||||
testWidgets('should_use_one_shared_52px_center_toggle_style', (tester) async {
|
||||
await tester.pumpWidget(
|
||||
MaterialApp(
|
||||
home: Scaffold(
|
||||
body: Row(
|
||||
children: [
|
||||
PlayerCenterToggle(
|
||||
key: const Key('home-feed-center-play'),
|
||||
key: const Key('test-center-toggle-a'),
|
||||
playing: false,
|
||||
onTap: () {},
|
||||
),
|
||||
@@ -30,7 +28,7 @@ void main() {
|
||||
);
|
||||
|
||||
for (final key in const [
|
||||
Key('home-feed-center-play'),
|
||||
Key('test-center-toggle-a'),
|
||||
Key('player-play-toggle'),
|
||||
]) {
|
||||
expect(tester.getSize(find.byKey(key)), const Size(52, 52));
|
||||
|
||||
Reference in new issue
Block a user