라이브 티커 · 갤럭시 검색 색인 · 주간 랭킹 스냅샷 · 연속 ZAP 상한 · 가입 행성 Zap · 성운 목표 · 랭킹 갱신 안내 · 행성 터치 반응
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:fancake/core/theme/app_theme.dart';
|
||||
import 'package:fancake/core/ui/live_planet.dart';
|
||||
import 'package:fancake/features/home/widgets/home_hero.dart';
|
||||
import 'package:fancake/features/home/widgets/growth_conditions.dart';
|
||||
import 'package:fancake/features/home/widgets/planet_growth_card.dart';
|
||||
@@ -7,6 +8,20 @@ import 'package:fancake/features/home/home_data.dart';
|
||||
import 'package:flutter_test/flutter_test.dart';
|
||||
|
||||
void main() {
|
||||
testWidgets('행성 본체를 누르면 흔들린 뒤 커뮤니티로 간다 (Figma 2024:20758)', (tester) async {
|
||||
const growth = PlanetGrowth(fandomName: 'BTS', contributorName: '팬', stage: 2,
|
||||
contributedPop: 0, growthPercent: null, currentPop: null, requiredPop: null);
|
||||
var opened = 0;
|
||||
await tester.pumpWidget(MaterialApp(theme: buildAppTheme(),
|
||||
home: Scaffold(body: HomeHero(growth: growth, fandomId: 'bts', onTapPlanet: () => opened++))));
|
||||
await tester.pump(const Duration(milliseconds: 100));
|
||||
await tester.tap(find.byType(LivePlanet25D), warnIfMissed: false);
|
||||
await tester.pump(const Duration(milliseconds: 100));
|
||||
expect(opened, 0, reason: '흔들림이 끝난 뒤 이동한다');
|
||||
await tester.pump(const Duration(milliseconds: 400));
|
||||
expect(opened, 1);
|
||||
});
|
||||
|
||||
testWidgets('기여 기록이 없으면 두 성장 영역에 가짜 0 POP 기여를 표시하지 않는다', (tester) async {
|
||||
const growth = PlanetGrowth(fandomName: 'BTS', contributorName: '팬',
|
||||
contributedPop: 0, growthPercent: null, currentPop: null, requiredPop: null);
|
||||
|
||||
Reference in New Issue
Block a user