|
|
@ -52,6 +52,7 @@ void main() { |
|
|
|
expect(response.body.extendedSupport, isFalse); |
|
|
|
expect(response.body.extendedSupport, isFalse); |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
group('OCS', () { |
|
|
|
test('Get capabilities', () async { |
|
|
|
test('Get capabilities', () async { |
|
|
|
final response = await client.core.ocs.getCapabilities(); |
|
|
|
final response = await client.core.ocs.getCapabilities(); |
|
|
|
expect(response.statusCode, 200); |
|
|
|
expect(response.statusCode, 200); |
|
|
@ -73,8 +74,10 @@ void main() { |
|
|
|
expect(response.body.ocs.data.capabilities.userStatusCapabilities, isNotNull); |
|
|
|
expect(response.body.ocs.data.capabilities.userStatusCapabilities, isNotNull); |
|
|
|
expect(response.body.ocs.data.capabilities.weatherStatusCapabilities, isNotNull); |
|
|
|
expect(response.body.ocs.data.capabilities.weatherStatusCapabilities, isNotNull); |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
test('Get navigation apps', () async { |
|
|
|
group('Navigation', () { |
|
|
|
|
|
|
|
test('Get apps navigation', () async { |
|
|
|
final response = await client.core.navigation.getAppsNavigation(); |
|
|
|
final response = await client.core.navigation.getAppsNavigation(); |
|
|
|
expect(response.statusCode, 200); |
|
|
|
expect(response.statusCode, 200); |
|
|
|
expect(() => response.headers, isA<void>()); |
|
|
|
expect(() => response.headers, isA<void>()); |
|
|
@ -87,8 +90,10 @@ void main() { |
|
|
|
expect(response.body.ocs.data[4].id, 'notes'); |
|
|
|
expect(response.body.ocs.data[4].id, 'notes'); |
|
|
|
expect(response.body.ocs.data[5].id, 'news'); |
|
|
|
expect(response.body.ocs.data[5].id, 'news'); |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
test('Autocomplete', () async { |
|
|
|
group('Autocomplete', () { |
|
|
|
|
|
|
|
test('Get', () async { |
|
|
|
final response = await client.core.autoComplete.$get( |
|
|
|
final response = await client.core.autoComplete.$get( |
|
|
|
search: '', |
|
|
|
search: '', |
|
|
|
itemType: 'call', |
|
|
|
itemType: 'call', |
|
|
@ -106,34 +111,42 @@ void main() { |
|
|
|
expect(response.body.ocs.data[0].subline, ''); |
|
|
|
expect(response.body.ocs.data[0].subline, ''); |
|
|
|
expect(response.body.ocs.data[0].shareWithDisplayNameUnique, ''); |
|
|
|
expect(response.body.ocs.data[0].shareWithDisplayNameUnique, ''); |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
test('Get preview', () async { |
|
|
|
group('Preview', () { |
|
|
|
|
|
|
|
test('Get', () async { |
|
|
|
final response = await client.core.preview.getPreview(file: 'Nextcloud.png'); |
|
|
|
final response = await client.core.preview.getPreview(file: 'Nextcloud.png'); |
|
|
|
expect(response.statusCode, 200); |
|
|
|
expect(response.statusCode, 200); |
|
|
|
expect(() => response.headers, isA<void>()); |
|
|
|
expect(() => response.headers, isA<void>()); |
|
|
|
|
|
|
|
|
|
|
|
expect(response.body, isNotEmpty); |
|
|
|
expect(response.body, isNotEmpty); |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
test('Get avatar', () async { |
|
|
|
group('Avatar', () { |
|
|
|
|
|
|
|
test('Get', () async { |
|
|
|
final response = await client.core.avatar.getAvatar(userId: 'admin', size: 32); |
|
|
|
final response = await client.core.avatar.getAvatar(userId: 'admin', size: 32); |
|
|
|
expect(response.body, isNotEmpty); |
|
|
|
expect(response.body, isNotEmpty); |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
test('Get dark avatar', () async { |
|
|
|
test('Get dark', () async { |
|
|
|
final response = await client.core.avatar.getAvatarDark(userId: 'admin', size: 32); |
|
|
|
final response = await client.core.avatar.getAvatarDark(userId: 'admin', size: 32); |
|
|
|
expect(response.body, isNotEmpty); |
|
|
|
expect(response.body, isNotEmpty); |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
test('Delete app password', () async { |
|
|
|
group('App password', () { |
|
|
|
|
|
|
|
test('Delete', () async { |
|
|
|
await client.core.appPassword.deleteAppPassword(); |
|
|
|
await client.core.appPassword.deleteAppPassword(); |
|
|
|
expect( |
|
|
|
expect( |
|
|
|
() => client.core.appPassword.deleteAppPassword(), |
|
|
|
() => client.core.appPassword.deleteAppPassword(), |
|
|
|
throwsA(predicate((final e) => (e! as DynamiteApiException).statusCode == 401)), |
|
|
|
throwsA(predicate((final e) => (e! as DynamiteApiException).statusCode == 401)), |
|
|
|
); |
|
|
|
); |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
test('Unified search providers', () async { |
|
|
|
group('Unified search', () { |
|
|
|
|
|
|
|
test('Get providers', () async { |
|
|
|
final response = await client.core.unifiedSearch.getProviders(); |
|
|
|
final response = await client.core.unifiedSearch.getProviders(); |
|
|
|
expect(response.statusCode, 200); |
|
|
|
expect(response.statusCode, 200); |
|
|
|
expect(() => response.headers, isA<void>()); |
|
|
|
expect(() => response.headers, isA<void>()); |
|
|
@ -141,7 +154,7 @@ void main() { |
|
|
|
expect(response.body.ocs.data, hasLength(14)); |
|
|
|
expect(response.body.ocs.data, hasLength(14)); |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
test('Unified search', () async { |
|
|
|
test('Search', () async { |
|
|
|
final response = await client.core.unifiedSearch.search( |
|
|
|
final response = await client.core.unifiedSearch.search( |
|
|
|
providerId: 'settings', |
|
|
|
providerId: 'settings', |
|
|
|
term: 'Personal info', |
|
|
|
term: 'Personal info', |
|
|
@ -161,8 +174,10 @@ void main() { |
|
|
|
expect(response.body.ocs.data.entries.single.rounded, isFalse); |
|
|
|
expect(response.body.ocs.data.entries.single.rounded, isFalse); |
|
|
|
expect(response.body.ocs.data.entries.single.attributes, isEmpty); |
|
|
|
expect(response.body.ocs.data.entries.single.attributes, isEmpty); |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
test('Client login flow V2', () async { |
|
|
|
group('Client login flow V2', () { |
|
|
|
|
|
|
|
test('Init and poll', () async { |
|
|
|
final response = await client.core.clientFlowLoginV2.init(); |
|
|
|
final response = await client.core.clientFlowLoginV2.init(); |
|
|
|
expect(response.statusCode, 200); |
|
|
|
expect(response.statusCode, 200); |
|
|
|
expect(() => response.headers, isA<void>()); |
|
|
|
expect(() => response.headers, isA<void>()); |
|
|
@ -176,6 +191,7 @@ void main() { |
|
|
|
throwsA(predicate<DynamiteApiException>((final e) => e.statusCode == 404)), |
|
|
|
throwsA(predicate<DynamiteApiException>((final e) => e.statusCode == 404)), |
|
|
|
); |
|
|
|
); |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
}); |
|
|
|
}, |
|
|
|
}, |
|
|
|
retry: retryCount, |
|
|
|
retry: retryCount, |
|
|
|
timeout: timeout, |
|
|
|
timeout: timeout, |
|
|
|