Figma 설명 프레임 반영 — 로그인·온보딩·스플래시 · HOME · GALAXY · 퀘스트·이클립스·알림
This commit is contained in:
@@ -14,6 +14,9 @@ import 'package:fancake/features/home/widgets/quest_row.dart';
|
||||
import 'package:fancake/features/inside/inside_detail_screen.dart';
|
||||
import 'package:fancake/features/quest/widgets/quest_card_tile.dart' show QuestIconBox;
|
||||
|
||||
import 'package:fancake/core/router/app_router.dart' show scrollTabToTop;
|
||||
import 'package:fancake/features/notification/notification_screen.dart';
|
||||
import 'package:fancake/features/home/nebula_create_screen.dart' show isValidNebulaName;
|
||||
import 'eclipse_stubs.dart';
|
||||
|
||||
class _LiveGrowthRepo extends SampleHomeRepository {
|
||||
@@ -379,4 +382,59 @@ void main() {
|
||||
await tester.pumpAndSettle();
|
||||
expect(opened, ['https://example.com/a']);
|
||||
});
|
||||
|
||||
group('설명 프레임 대조(홈 일반)', () {
|
||||
Future<bool> badgeShown(WidgetTester tester, List<AppNotification> items) async {
|
||||
await tester.pumpWidget(
|
||||
MaterialApp(
|
||||
theme: buildAppTheme(),
|
||||
home: Scaffold(
|
||||
body: HomeHeader(
|
||||
key: UniqueKey(),
|
||||
pop: 0,
|
||||
notifications: SampleNotificationRepository(items: items),
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
await tester.pumpAndSettle();
|
||||
return tester.widget<Badge>(find.byKey(const ValueKey('home-bell-badge'))).isLabelVisible;
|
||||
}
|
||||
|
||||
AppNotification n(bool read) => AppNotification(
|
||||
id: 'n$read', kind: NotificationKind.quest, title: 't', at: DateTime(2026), read: read,
|
||||
);
|
||||
|
||||
testWidgets('2097:16385 — 안 읽은 알림이 있으면 알림 아이콘에 배지', (tester) async {
|
||||
expect(await badgeShown(tester, [n(false), n(true)]), isTrue);
|
||||
expect(await badgeShown(tester, [n(true)]), isFalse);
|
||||
});
|
||||
|
||||
testWidgets('2097:16427 — 열린 탭을 다시 누르면 루트 화면이 맨 위로', (tester) async {
|
||||
final key = GlobalKey<NavigatorState>();
|
||||
await tester.pumpWidget(
|
||||
MaterialApp(
|
||||
navigatorKey: key,
|
||||
home: Scaffold(
|
||||
body: ListView(children: [for (var i = 0; i < 50; i++) SizedBox(height: 100, child: Text('$i'))]),
|
||||
),
|
||||
),
|
||||
);
|
||||
await tester.drag(find.byType(ListView), const Offset(0, -1500));
|
||||
await tester.pumpAndSettle();
|
||||
expect(find.text('0'), findsNothing);
|
||||
scrollTabToTop(key);
|
||||
await tester.pumpAndSettle();
|
||||
expect(find.text('0'), findsOneWidget);
|
||||
});
|
||||
|
||||
test('516:87397 — 성운명 규칙은 서버와 같다', () {
|
||||
for (final ok in ['방탄', 'BTS Army 7', '가' * 20]) {
|
||||
expect(isValidNebulaName(ok), isTrue, reason: ok);
|
||||
}
|
||||
for (final bad in ['가', '가' * 21, ' 방탄', '방탄 ', '방 탄', '방탄!', '방탄😀']) {
|
||||
expect(isValidNebulaName(bad), isFalse, reason: bad);
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user