import 'package:flutter/material.dart';
import 'package:flutter_test/flutter_test.dart';
import 'package:flutter_riverpod/flutter_riverpod.dart';

import 'package:kuaishai2/main.dart';

void main() {
  testWidgets('App launches without errors', (WidgetTester tester) async {
    // 验证应用能正常启动，不抛出异常
    await tester.pumpWidget(const ProviderScope(child: KuaishaiApp()));

    // 等待异步加载完成
    await tester.pumpAndSettle(const Duration(seconds: 3));

    // 验证 Scaffold 存在（应用正常渲染）
    expect(find.byType(Scaffold), findsWidgets);
  });
}