feat: 增强日历功能并集成 AgentScope 代理服务
This commit is contained in:
@@ -22,6 +22,7 @@ void main() {
|
||||
'color': '#4F46E5',
|
||||
'location': '会议室A',
|
||||
'notes': '带电脑',
|
||||
'reminder_minutes': 15,
|
||||
'attachments': [
|
||||
{
|
||||
'name': '议程文档',
|
||||
@@ -52,6 +53,7 @@ void main() {
|
||||
expect(result, hasLength(1));
|
||||
expect(result.first.metadata?.attachments, hasLength(1));
|
||||
expect(result.first.metadata?.raw['new_field'], 'future');
|
||||
expect(result.first.metadata?.reminderMinutes, 15);
|
||||
expect(result.first.startAt.isUtc, isFalse);
|
||||
});
|
||||
|
||||
@@ -60,6 +62,7 @@ void main() {
|
||||
client.registerHandler('/api/v1/schedule-items', 'POST', (request) {
|
||||
final body = request.data as Map<String, dynamic>;
|
||||
expect(body['metadata']['version'], 1);
|
||||
expect(body['metadata']['reminder_minutes'], 15);
|
||||
expect(body['metadata']['attachments'], isA<List<dynamic>>());
|
||||
return {
|
||||
'id': 'evt_2',
|
||||
@@ -83,6 +86,7 @@ void main() {
|
||||
location: '线上',
|
||||
notes: '准备 demo',
|
||||
attachments: [Attachment(name: 'PRD', type: 'document')],
|
||||
reminderMinutes: 15,
|
||||
version: 1,
|
||||
),
|
||||
),
|
||||
@@ -100,6 +104,7 @@ void main() {
|
||||
final body = request.data as Map<String, dynamic>;
|
||||
final metadata = body['metadata'] as Map<String, dynamic>;
|
||||
expect(metadata.containsKey('new_field'), isFalse);
|
||||
expect(metadata['reminder_minutes'], 30);
|
||||
return {
|
||||
'id': 'evt_3',
|
||||
...body,
|
||||
@@ -121,6 +126,7 @@ void main() {
|
||||
'notes': '更新周报',
|
||||
'attachments': const [],
|
||||
'version': 1,
|
||||
'reminder_minutes': 30,
|
||||
'new_field': 'future',
|
||||
}),
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user