From 258e0e37ccba5c5135d02b6601f25b692c83428e Mon Sep 17 00:00:00 2001 From: ttipo Date: Thu, 17 Sep 2026 14:31:46 +0900 Subject: [PATCH] =?UTF-8?q?fix(flutter):=20=EB=94=94=EB=A0=89=ED=84=B0?= =?UTF-8?q?=EB=A6=AC=20=EA=B5=AC=EC=A1=B0=EB=A5=BC=20=EA=B7=9C=EC=B9=99?= =?UTF-8?q?=EC=97=90=20=EB=A7=9E=EC=B6=94=EA=B3=A0=20=EA=B9=A8=EC=A7=84=20?= =?UTF-8?q?=ED=85=8C=EC=8A=A4=ED=8A=B8=20=EA=B5=90=EC=B2=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 공통 위젯 위치를 lib/widgets/ 에서 규칙상 목표인 lib/shared/widgets/ 로 이동 - 기본 생성된 카운터 위젯 테스트가 실제 앱과 맞지 않아 실패 상태였다 — 앱 렌더링을 검증하는 테스트로 교체 Co-Authored-By: Claude Opus 5 (1M context) --- flutter/lib/{ => shared}/widgets/.gitkeep | 0 flutter/pubspec.lock | 8 +++++++ flutter/test/widget_test.dart | 29 ++++++----------------- 3 files changed, 15 insertions(+), 22 deletions(-) rename flutter/lib/{ => shared}/widgets/.gitkeep (100%) diff --git a/flutter/lib/widgets/.gitkeep b/flutter/lib/shared/widgets/.gitkeep similarity index 100% rename from flutter/lib/widgets/.gitkeep rename to flutter/lib/shared/widgets/.gitkeep diff --git a/flutter/pubspec.lock b/flutter/pubspec.lock index aafe785..813608b 100644 --- a/flutter/pubspec.lock +++ b/flutter/pubspec.lock @@ -158,6 +158,14 @@ packages: description: flutter source: sdk version: "0.0.0" + flutter_dotenv: + dependency: "direct main" + description: + name: flutter_dotenv + sha256: b7c7be5cd9f6ef7a78429cabd2774d3c4af50e79cb2b7593e3d5d763ef95c61b + url: "https://pub.dev" + source: hosted + version: "5.2.1" flutter_lints: dependency: "direct dev" description: diff --git a/flutter/test/widget_test.dart b/flutter/test/widget_test.dart index bbc3fcc..bc87675 100644 --- a/flutter/test/widget_test.dart +++ b/flutter/test/widget_test.dart @@ -1,30 +1,15 @@ -// This is a basic Flutter widget test. -// -// To perform an interaction with a widget in your test, use the WidgetTester -// utility in the flutter_test package. For example, you can send tap and scroll -// gestures. You can also use WidgetTester to find child widgets in the widget -// tree, read text, and verify that the values of widget properties are correct. - import 'package:flutter/material.dart'; +import 'package:flutter_riverpod/flutter_riverpod.dart'; import 'package:flutter_test/flutter_test.dart'; - import 'package:tma_app/main.dart'; void main() { - testWidgets('Counter increments smoke test', (WidgetTester tester) async { - // Build our app and trigger a frame. - await tester.pumpWidget(const MyApp()); + testWidgets('앱이 정상적으로 렌더링된다', (WidgetTester tester) async { + await tester.pumpWidget( + const ProviderScope(child: MyApp()), + ); - // Verify that our counter starts at 0. - expect(find.text('0'), findsOneWidget); - expect(find.text('1'), findsNothing); - - // Tap the '+' icon and trigger a frame. - await tester.tap(find.byIcon(Icons.add)); - await tester.pump(); - - // Verify that our counter has incremented. - expect(find.text('0'), findsNothing); - expect(find.text('1'), findsOneWidget); + expect(find.byType(MaterialApp), findsOneWidget); + expect(find.byType(Scaffold), findsOneWidget); }); }