-
-
Notifications
You must be signed in to change notification settings - Fork 468
Expand file tree
/
Copy pathGraphqlTaskSystemTest.kt
More file actions
40 lines (32 loc) · 1.1 KB
/
GraphqlTaskSystemTest.kt
File metadata and controls
40 lines (32 loc) · 1.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
package io.sentry.systemtest
import io.sentry.systemtest.util.TestHelper
import kotlin.test.Test
import kotlin.test.assertEquals
import org.junit.Before
class GraphqlTaskSystemTest {
lateinit var testHelper: TestHelper
@Before
fun setup() {
testHelper = TestHelper("http://localhost:8080")
testHelper.reset()
}
@Test
fun `tasks and assignees query works`() {
val response = testHelper.graphqlClient.tasksAndAssignees("project-slug")
testHelper.ensureNoErrors(response)
assertEquals(5, response?.data?.tasks?.size)
val firstTask = response?.data?.tasks?.firstOrNull() ?: throw RuntimeException("no task")
assertEquals("T1", firstTask.id)
assertEquals("A3", firstTask.assigneeId)
assertEquals("A3", firstTask.assignee?.id)
assertEquals("C3", firstTask.creatorId)
assertEquals("C3", firstTask.creator?.id)
testHelper.ensureTransactionReceived { transaction, envelopeHeader ->
testHelper.doesTransactionContainSpanWithOpAndDescription(
transaction,
"query TasksAndAssigneesQuery",
"query TasksAndAssigneesQuery",
)
}
}
}