사용자 화면 문구·표본 데이터 · 퀘스트 참여 흐름 · HOME 진입 구획 · 미니맵 · 공통 확인 창 배치 수정
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
import 'dart:async';
|
||||
import 'dart:convert';
|
||||
import 'dart:typed_data';
|
||||
|
||||
import 'package:fancake/features/auth/auth.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';
|
||||
import 'package:fancake/features/my/my_lists_screen.dart';
|
||||
@@ -15,8 +15,11 @@ import 'package:fancake/features/my/push_settings_screen.dart';
|
||||
import 'package:fancake/features/my/settings_screen.dart';
|
||||
import 'package:fancake/features/my/support_screens.dart';
|
||||
import 'package:fancake/features/my/tier_screens.dart';
|
||||
import 'package:fancake/features/my/widgets/profile_card.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:flutter_test/flutter_test.dart';
|
||||
import 'package:share_plus/share_plus.dart';
|
||||
|
||||
/// F6 MY — 화면 대조 원장 21화면.
|
||||
|
||||
@@ -178,11 +181,45 @@ void main() {
|
||||
await tester.pump();
|
||||
await tester.tap(find.byType(CircleAvatar).first);
|
||||
await tester.pumpAndSettle();
|
||||
for (final target in const ['인스타그램', '틱톡', 'X', '링크 복사']) {
|
||||
// 프로필 웹 주소가 없어 마지막 칸은 「문구 복사」다(없는 링크를 약속하지 않는다).
|
||||
for (final target in const ['인스타그램', '틱톡', 'X', '문구 복사']) {
|
||||
expect(find.byTooltip(target), findsOneWidget);
|
||||
}
|
||||
});
|
||||
|
||||
testWidgets('공유는 OS 공유 시트로 프로필 문구를 보낸다 — 내부 일정 문구 없음', (tester) async {
|
||||
final profile = await SampleMyRepository().profile();
|
||||
ShareParams? sent;
|
||||
final copied = await shareProfile(
|
||||
profile,
|
||||
'인스타그램',
|
||||
share: (params) async {
|
||||
sent = params;
|
||||
return const ShareResult('ok', ShareResultStatus.success);
|
||||
},
|
||||
);
|
||||
expect(copied, isFalse);
|
||||
expect(sent?.text, contains(profile.nickname));
|
||||
expect(sent?.text, contains('#FANUZU'));
|
||||
expect(sent?.text, isNot(contains('회차')));
|
||||
|
||||
// 마지막 칸은 공유 시트 대신 같은 문구를 복사한다.
|
||||
String? clip;
|
||||
tester.binding.defaultBinaryMessenger.setMockMethodCallHandler(
|
||||
SystemChannels.platform,
|
||||
(call) async {
|
||||
if (call.method == 'Clipboard.setData') {
|
||||
clip = (call.arguments as Map)['text'] as String?;
|
||||
}
|
||||
return null;
|
||||
},
|
||||
);
|
||||
addTearDown(() => tester.binding.defaultBinaryMessenger
|
||||
.setMockMethodCallHandler(SystemChannels.platform, null));
|
||||
expect(await shareProfile(profile, '문구 복사'), isTrue);
|
||||
expect(clip, profileShareText(profile));
|
||||
});
|
||||
|
||||
testWidgets('티어 카드를 누르면 행성별 티어로 넘어간다', (tester) async {
|
||||
await pumpWide(tester, MyScreen(repository: SampleMyRepository()));
|
||||
await tester.pump();
|
||||
@@ -844,11 +881,17 @@ void main() {
|
||||
});
|
||||
|
||||
group('내 활동 (F6 · 370:228289 · 370:229665)', () {
|
||||
testWidgets('내 인사이드에 내가 올린 글이 나온다', (tester) async {
|
||||
await pumpWide(tester, const MyListsScreen(kind: MyListKind.inside));
|
||||
await tester.pump();
|
||||
expect(find.textContaining('화양연화'), findsOneWidget);
|
||||
expect(find.text('500 P'), findsOneWidget);
|
||||
testWidgets('내 인사이드는 저장소의 내 질문을 보여 준다 — 고정 표본 없음', (tester) async {
|
||||
await pumpWide(
|
||||
tester,
|
||||
const MyListsScreen(kind: MyListKind.inside, insides: _MyInsides()),
|
||||
);
|
||||
await tester.pumpAndSettle();
|
||||
expect(find.text('device-check-question'), findsOneWidget);
|
||||
expect(find.text('100 P'), findsOneWidget);
|
||||
// 10/4 실기기 8-3 — 내 글 대신 뜨던 표본(실제 아티스트명 포함).
|
||||
expect(find.textContaining('화양연화'), findsNothing);
|
||||
expect(find.textContaining('BTS'), findsNothing);
|
||||
});
|
||||
|
||||
testWidgets('내 캠페인에는 내가 만든 것만 나온다', (tester) async {
|
||||
@@ -1000,3 +1043,21 @@ class _PagedZapRepository extends SampleMyRepository {
|
||||
return [_rows[i + 1]];
|
||||
}
|
||||
}
|
||||
|
||||
/// 내가 쓴 질문 한 건만 돌려주는 저장소 — 화면이 저장소를 읽는지 확인한다.
|
||||
class _MyInsides extends SampleInsideRepository {
|
||||
const _MyInsides();
|
||||
|
||||
@override
|
||||
Future<List<InsideQuestion>> mine() async => [
|
||||
InsideQuestion(
|
||||
id: 'mine-1',
|
||||
title: 'device-check-question',
|
||||
body: '본문',
|
||||
authorName: '팬',
|
||||
createdAt: DateTime(2026, 10, 4),
|
||||
bountyPop: 100,
|
||||
isMine: true,
|
||||
),
|
||||
];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user