test(player): 覆盖 feed 高清首帧解析
This commit is contained in:
1 parent
80c962a95c
commit
5dafc68775
1 file changed
+28
@@ -51,12 +51,40 @@ void main() {
|
|||||||
'title': '第 1 集',
|
'title': '第 1 集',
|
||||||
'isFree': true,
|
'isFree': true,
|
||||||
'playUrl': '/files/episode/9.mp4',
|
'playUrl': '/files/episode/9.mp4',
|
||||||
|
'posterUrl': '/files/transcoded/9/poster.jpg',
|
||||||
|
'thumbnailsUrl': '/files/transcoded/9/thumbnails/thumbnails.vtt',
|
||||||
},
|
},
|
||||||
}),
|
}),
|
||||||
]);
|
]);
|
||||||
|
|
||||||
expect(home.length, 1);
|
expect(home.length, 1);
|
||||||
expect(home.entryAt(0).episode.videoUrl, '/files/episode/9.mp4');
|
expect(home.entryAt(0).episode.videoUrl, '/files/episode/9.mp4');
|
||||||
|
expect(
|
||||||
|
home.entryAt(0).episode.posterUrl,
|
||||||
|
'/files/transcoded/9/poster.jpg',
|
||||||
|
);
|
||||||
|
});
|
||||||
|
|
||||||
|
test('should_parse_poster_url_for_drama_detail_episode_list', () {
|
||||||
|
final drama = Drama.fromDetailJson(const {
|
||||||
|
'id': 5,
|
||||||
|
'title': '闪婚后',
|
||||||
|
'cover': '/files/cover.jpg',
|
||||||
|
'episodes': [
|
||||||
|
{
|
||||||
|
'id': 9,
|
||||||
|
'number': 1,
|
||||||
|
'title': '第 1 集',
|
||||||
|
'isFree': true,
|
||||||
|
'posterUrl': '/files/transcoded/9/poster.jpg',
|
||||||
|
},
|
||||||
|
],
|
||||||
|
});
|
||||||
|
|
||||||
|
expect(
|
||||||
|
drama.episodes.single.posterUrl,
|
||||||
|
'/files/transcoded/9/poster.jpg',
|
||||||
|
);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user