h-1.flutter.4/test/widget_test.dart
joe 8ea10dad79 chore: 工程管理ドキュメントを追加し、UI リファクタリング</new_task>feat: docs/requirements.md, docs/project_plan.md の追加
- 機能要件・非機能要件定義
- 短期長期プロジェクト計画の策定

docs: UI ライティングリファクタリング
- 編集 SnackBar から Cancel ボタン削除
- タイル表示からプレースホルダメッセージへ</new_task>chore: README のドキュメント活用方法追記</new_task>
2026-03-07 14:30:12 +09:00

30 lines
1 KiB
Dart

// 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_test/flutter_test.dart';
import 'package:sales_assist_1/main.dart';
void main() {
testWidgets('Counter increments smoke test', (WidgetTester tester) async {
// Build our app and trigger a frame.
await tester.pumpWidget(const 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);
});
}