21 lines
887 B
Dart
21 lines
887 B
Dart
import 'package:flutter_test/flutter_test.dart';
|
|
|
|
import 'package:fancake/features/galaxy/galaxy_data.dart';
|
|
import 'package:fancake/features/galaxy/galaxy_home_screen.dart';
|
|
|
|
/// 「내 행성」 칸 그림은 칸 순서가 아니라 팬덤 stage 로 고른다 — 실기기에서 둘째 칸의
|
|
/// FANUZU 데모 행성(stage 1)이 성운 그림으로 나왔다.
|
|
void main() {
|
|
PlanetNode node(int? stage) => PlanetNode(
|
|
id: 'x', name: 'x', rank: 1, fpi: 0, members: 0, online: 0, stage: stage,
|
|
);
|
|
|
|
test('정식 행성은 어느 칸이든 행성 그림, 성운만 성운 그림', () {
|
|
for (final i in [0, 1, 2]) {
|
|
expect(GalaxyHomeScreen.cardImageOf(node(1), i), isNot(contains('nebula')));
|
|
expect(GalaxyHomeScreen.cardImageOf(node(null), i), isNot(contains('nebula')));
|
|
expect(GalaxyHomeScreen.cardImageOf(node(0), i), contains('nebula'));
|
|
}
|
|
});
|
|
}
|