@@ -23,6 +23,7 @@ package com.nextcloud.client.assistant
23
23
24
24
import com.nextcloud.client.assistant.repository.AssistantRepository
25
25
import com.owncloud.android.AbstractOnServerIT
26
+ import com.owncloud.android.lib.resources.status.NextcloudVersion
26
27
import org.junit.Assert.assertTrue
27
28
import org.junit.Before
28
29
import org.junit.Test
@@ -39,6 +40,12 @@ class AssistantRepositoryTests : AbstractOnServerIT() {
39
40
40
41
@Test
41
42
fun testGetTaskTypes () {
43
+ testOnlyOnServer(NextcloudVersion .nextcloud_28)
44
+
45
+ if (capability.assistant.isFalse) {
46
+ return
47
+ }
48
+
42
49
val result = sut?.getTaskTypes()
43
50
assertTrue(result?.isSuccess == true )
44
51
@@ -48,6 +55,12 @@ class AssistantRepositoryTests : AbstractOnServerIT() {
48
55
49
56
@Test
50
57
fun testGetTaskList () {
58
+ testOnlyOnServer(NextcloudVersion .nextcloud_28)
59
+
60
+ if (capability.assistant.isFalse) {
61
+ return
62
+ }
63
+
51
64
val result = sut?.getTaskList(" assistant" )
52
65
assertTrue(result?.isSuccess == true )
53
66
@@ -57,6 +70,12 @@ class AssistantRepositoryTests : AbstractOnServerIT() {
57
70
58
71
@Test
59
72
fun testCreateTask () {
73
+ testOnlyOnServer(NextcloudVersion .nextcloud_28)
74
+
75
+ if (capability.assistant.isFalse) {
76
+ return
77
+ }
78
+
60
79
val input = " Give me some random output for test purpose"
61
80
val type = " OCP\\ TextProcessing\\ FreePromptTaskType"
62
81
val result = sut?.createTask(input, type)
@@ -65,6 +84,12 @@ class AssistantRepositoryTests : AbstractOnServerIT() {
65
84
66
85
@Test
67
86
fun testDeleteTask () {
87
+ testOnlyOnServer(NextcloudVersion .nextcloud_28)
88
+
89
+ if (capability.assistant.isFalse) {
90
+ return
91
+ }
92
+
68
93
testCreateTask()
69
94
70
95
sleep(120 )
0 commit comments