feat: 优化 Agent 运行时与聊天设置体验
This commit is contained in:
@@ -0,0 +1,47 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_test/flutter_test.dart';
|
||||
import 'package:social_app/features/settings/ui/widgets/account_section_card.dart';
|
||||
import 'package:social_app/features/settings/ui/widgets/account_surface_scaffold.dart';
|
||||
|
||||
void main() {
|
||||
testWidgets('AccountSectionCard renders title and description', (
|
||||
tester,
|
||||
) async {
|
||||
await tester.pumpWidget(
|
||||
const MaterialApp(
|
||||
home: Scaffold(
|
||||
body: AccountSectionCard(
|
||||
title: '基础信息',
|
||||
description: '请填写公开展示资料',
|
||||
child: Text('内容区'),
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
expect(find.text('基础信息'), findsOneWidget);
|
||||
expect(find.text('请填写公开展示资料'), findsOneWidget);
|
||||
expect(find.text('内容区'), findsOneWidget);
|
||||
});
|
||||
|
||||
testWidgets('AccountSurfaceScaffold renders header and footer', (
|
||||
tester,
|
||||
) async {
|
||||
await tester.pumpWidget(
|
||||
MaterialApp(
|
||||
home: AccountSurfaceScaffold(
|
||||
title: '编辑资料',
|
||||
subtitle: '管理账户公开信息',
|
||||
body: const Text('主体内容'),
|
||||
footer: const Text('底部操作区'),
|
||||
onBack: () {},
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
expect(find.text('编辑资料'), findsOneWidget);
|
||||
expect(find.text('管理账户公开信息'), findsOneWidget);
|
||||
expect(find.text('主体内容'), findsOneWidget);
|
||||
expect(find.text('底部操作区'), findsOneWidget);
|
||||
});
|
||||
}
|
||||
Reference in New Issue
Block a user