feat(flutter): 重设计播放页与操作面板
This commit is contained in:
1 parent
148fbc3c93
commit
9a4269b847
24 files changed
+2395
-1101
No files matched your search
+11
-15
@@ -226,7 +226,7 @@ void main() {
|
||||
await tester.pumpAndSettle();
|
||||
await _openTheaterPlayer(tester);
|
||||
|
||||
await tester.tap(find.byKey(const Key('player-comments')));
|
||||
await tester.tap(find.byKey(const Key('player-rail-comments')));
|
||||
await tester.pumpAndSettle();
|
||||
expect(find.text('No comments yet.'), findsOneWidget);
|
||||
await tester.enterText(find.byKey(const Key('comment-input')), 'Nice demo');
|
||||
@@ -236,11 +236,14 @@ void main() {
|
||||
await tester.binding.handlePopRoute();
|
||||
await tester.pumpAndSettle();
|
||||
|
||||
await _tapPlayerMore(tester, const Key('player-more-like'));
|
||||
await tester.tap(find.byKey(const Key('player-rail-like')));
|
||||
await tester.pumpAndSettle();
|
||||
expect(interactions.likeTargets, contains('DRAMA:city-lights-demo'));
|
||||
|
||||
await _tapPlayerMore(tester, const Key('player-more-favorite'));
|
||||
await _tapPlayerMore(tester, const Key('player-more-share'));
|
||||
await tester.tap(find.byKey(const Key('player-rail-save')));
|
||||
await tester.pumpAndSettle();
|
||||
await tester.tap(find.byKey(const Key('player-rail-share')));
|
||||
await tester.pumpAndSettle();
|
||||
expect(sharedText, contains('City Lights & Velvet Nights'));
|
||||
expect(sharedText, contains('FruitShorts'));
|
||||
expect(tester.takeException(), isNull);
|
||||
@@ -256,7 +259,8 @@ void main() {
|
||||
await tester.pumpWidget(appUnderTest(interactionRepository: interactions));
|
||||
await tester.pumpAndSettle();
|
||||
await _openTheaterPlayer(tester);
|
||||
await _tapPlayerMore(tester, const Key('player-more-like'));
|
||||
await tester.tap(find.byKey(const Key('player-rail-like')));
|
||||
await tester.pumpAndSettle();
|
||||
|
||||
expect(find.text('Sign in to continue'), findsOneWidget);
|
||||
expect(interactions.likeTargets, isEmpty);
|
||||
@@ -271,7 +275,8 @@ void main() {
|
||||
await tester.pumpWidget(appUnderTest());
|
||||
await tester.pumpAndSettle();
|
||||
await _openTheaterPlayer(tester);
|
||||
await _tapPlayerMore(tester, const Key('player-more-favorite'));
|
||||
await tester.tap(find.byKey(const Key('player-rail-save')));
|
||||
await tester.pumpAndSettle();
|
||||
|
||||
await tester.tap(find.byKey(const Key('player-back')));
|
||||
await tester.pumpAndSettle();
|
||||
@@ -303,12 +308,3 @@ Future<void> _openTheaterPlayer(WidgetTester tester) async {
|
||||
await tester.tap(card);
|
||||
await tester.pumpAndSettle();
|
||||
}
|
||||
|
||||
Future<void> _tapPlayerMore(WidgetTester tester, Key action) async {
|
||||
await tester.tap(find.byKey(const Key('player-more')));
|
||||
await tester.pumpAndSettle();
|
||||
await tester.ensureVisible(find.byKey(action));
|
||||
await tester.pumpAndSettle();
|
||||
await tester.tap(find.byKey(action));
|
||||
await tester.pumpAndSettle();
|
||||
}
|
||||
Reference in new issue
Block a user