걸음 카드 보상 칸 · Music Shake 이어하기 재생
This commit is contained in:
@@ -227,4 +227,28 @@ void main() {
|
||||
expect(QuestType.musicShake.rewardFrom(const {}, const {}), isNull);
|
||||
});
|
||||
});
|
||||
|
||||
group('걸음 보상 표시 (원장 B-26)', () {
|
||||
const policy = {
|
||||
'stepTiers': [
|
||||
{'steps': 5000, 'pop': 6},
|
||||
{'steps': 1000, 'pop': 5},
|
||||
{'steps': 10000, 'pop': 7},
|
||||
{'steps': 15000, 'pop': 8},
|
||||
],
|
||||
};
|
||||
test('운영 걸음 Quest 는 오늘 다음 구간의 지급액이다 — 「- POP」 아님 (10/6 A-5)', () {
|
||||
expect(QuestType.steps.rewardFrom(const {}, policy), 5);
|
||||
expect(QuestType.steps.rewardFrom(const {}, policy, cleared: 2), 7);
|
||||
// 다 받은 뒤에는 마지막 구간 값에 머문다.
|
||||
expect(QuestType.steps.rewardFrom(const {}, policy, cleared: 4), 8);
|
||||
});
|
||||
test('사용자 생성 만보기는 생성자가 정한 보상, 구간표가 없으면 지어내지 않는다', () {
|
||||
expect(
|
||||
QuestType.steps.rewardFrom(const {'authorUid': 'u', 'rewardPop': 30}, policy),
|
||||
30,
|
||||
);
|
||||
expect(QuestType.steps.rewardFrom(const {}, const {}), isNull);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
@@ -171,4 +171,14 @@ void main() {
|
||||
expect(judge.hits.take(2).every((h) => h >= 0), isTrue);
|
||||
expect(judge.live(judge.position).judged, 2);
|
||||
});
|
||||
|
||||
test('이어하기면 플레이어가 준비되자마자 저장 위치로 옮겨 튼다 — 처음 시작은 사용자가 누른다 (10/6 A-2)', () {
|
||||
final resume = YoutubeEmbed.html(
|
||||
'vid',
|
||||
startSeconds: 9,
|
||||
resumeAt: const Duration(milliseconds: 9910),
|
||||
);
|
||||
expect(resume, contains('player.seekTo(9.91,true);player.playVideo();'));
|
||||
expect(YoutubeEmbed.html('vid'), isNot(contains('playVideo')));
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user