번역 평가 버튼 · 내 퀘스트 검토 버튼 · MY 질문 상세 · MY 완료 퀘스트 수 · 행성/성운 칸 · 라운지 빈 상태 수정
This commit is contained in:
@@ -2,6 +2,7 @@ import 'dart:async';
|
||||
import 'dart:convert';
|
||||
|
||||
import 'package:fancake/features/auth/auth.dart';
|
||||
import 'package:fancake/features/galaxy/galaxy_data.dart';
|
||||
import 'package:fancake/features/inside/inside_data.dart';
|
||||
import 'package:fancake/features/auth/auth_repository.dart';
|
||||
import 'package:fancake/features/my/my_data.dart';
|
||||
@@ -176,6 +177,24 @@ void main() {
|
||||
expect(find.text('37'), findsOneWidget);
|
||||
});
|
||||
|
||||
testWidgets('행성/성운 칸은 가입 목록을 팬덤 stage 그림으로 그린다', (tester) async {
|
||||
await pumpWide(
|
||||
tester,
|
||||
MyScreen(
|
||||
repository: SampleMyRepository(),
|
||||
galaxy: _OneNebula(),
|
||||
),
|
||||
);
|
||||
await tester.pump();
|
||||
final images = tester
|
||||
.widgetList<Image>(find.byType(Image))
|
||||
.map((i) => (i.image as AssetImage).assetName)
|
||||
.toList();
|
||||
expect(images, contains('assets/figma/nebula-card.png'));
|
||||
expect(images.where((a) => a.startsWith('assets/figma/my-planet-')), isEmpty);
|
||||
expect(find.bySemanticsLabel('새 성운'), findsOneWidget);
|
||||
});
|
||||
|
||||
testWidgets('프로필을 누르면 카드 오버레이가 뜬다', (tester) async {
|
||||
await pumpWide(tester, MyScreen(repository: SampleMyRepository()));
|
||||
await tester.pump();
|
||||
@@ -1061,3 +1080,18 @@ class _MyInsides extends SampleInsideRepository {
|
||||
),
|
||||
];
|
||||
}
|
||||
|
||||
/// 가입 행성이 성운(Stage0) 하나뿐인 계정.
|
||||
class _OneNebula extends SampleGalaxyRepository {
|
||||
@override
|
||||
Future<GalaxySnapshot> load() async => const GalaxySnapshot(
|
||||
planets: [],
|
||||
myPop: 0,
|
||||
memberships: [
|
||||
PlanetNode(
|
||||
id: 'n1', name: '새 성운', rank: 0, fpi: 0, members: 1, online: 0,
|
||||
isMine: true, stage: 0,
|
||||
),
|
||||
],
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user