FPI 랭킹 내 행성·내 국가 판정 · 콜드 스타트 약관 깜빡임 · 로그아웃 상한
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
import 'dart:async';
|
||||
|
||||
import 'package:fancake/app.dart';
|
||||
import 'package:fancake/core/data/repositories.dart';
|
||||
import 'package:fancake/core/firebase/firebase_boot.dart';
|
||||
@@ -5,6 +7,7 @@ import 'package:fancake/features/auth/auth.dart';
|
||||
import 'package:fancake/features/auth/auth_repository.dart';
|
||||
import 'package:fancake/features/auth/login_screen.dart';
|
||||
import 'package:fancake/features/auth/onboarding_data.dart';
|
||||
import 'package:fancake/features/auth/onboarding_screens.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_test/flutter_test.dart';
|
||||
import 'package:shared_preferences/shared_preferences.dart';
|
||||
@@ -20,6 +23,7 @@ void main() {
|
||||
WidgetTester tester, {
|
||||
required bool needs,
|
||||
bool intro = false,
|
||||
Duration checkDelay = Duration.zero,
|
||||
}) async {
|
||||
tester.view.physicalSize = const Size(1080, 2400);
|
||||
tester.view.devicePixelRatio = 2;
|
||||
@@ -28,7 +32,7 @@ void main() {
|
||||
final auth = AuthRepository(
|
||||
providers: [_Provider()],
|
||||
releaseMode: true,
|
||||
needsOnboarding: (_) async => needs,
|
||||
needsOnboarding: (_) => Future.delayed(checkDelay, () => needs),
|
||||
introPending: intro,
|
||||
);
|
||||
addTearDown(auth.dispose);
|
||||
@@ -53,6 +57,22 @@ void main() {
|
||||
expect(find.byType(NavigationBar), findsOneWidget);
|
||||
});
|
||||
|
||||
testWidgets('동의한 계정은 셸로 가는 동안 약관 화면이 한 프레임도 그려지지 않는다 — 10/6 콜드 스타트 깜빡임', (tester) async {
|
||||
// 서버 판정이 몇 프레임 걸리는 실기기처럼 늦춘다.
|
||||
final (auth, _) = await boot(
|
||||
tester,
|
||||
needs: false,
|
||||
checkDelay: const Duration(milliseconds: 200),
|
||||
);
|
||||
unawaited(auth.signIn(SocialProvider.google));
|
||||
for (var i = 0; i < 60; i++) {
|
||||
await tester.pump(const Duration(milliseconds: 16));
|
||||
expect(find.byType(OnboardingFlow), findsNothing);
|
||||
}
|
||||
await tester.pumpAndSettle();
|
||||
expect(find.byType(NavigationBar), findsOneWidget);
|
||||
});
|
||||
|
||||
testWidgets('약관 → 프로필 → 관심 아티스트 → 행성 가입 → 권한 → 가입 완료 → 셸', (tester) async {
|
||||
final (auth, repo) = await boot(tester, needs: true);
|
||||
await auth.signIn(SocialProvider.google);
|
||||
|
||||
Reference in New Issue
Block a user