@@ -19,6 +19,8 @@ import {
19
19
20
20
@InputType ( )
21
21
class TestArgs {
22
+
23
+ @Field ( )
22
24
@Field ( )
23
25
testName : string ;
24
26
@@ -52,14 +54,17 @@ class SaveTestsArgs extends RefArgs {
52
54
53
55
@InputType ( )
54
56
class TestIdentifierArgs {
55
- @Field ( _type => [ String ] )
56
- values : string [ ] ;
57
+ @Field ( { nullable : true } )
58
+ testName ?: string ;
59
+
60
+ @Field ( { nullable : true } )
61
+ groupName ?: string ;
57
62
}
58
63
59
64
@ArgsType ( )
60
65
class RunTestsArgs extends RefArgs {
61
66
@Field ( { nullable : true } )
62
- identifiers ?: TestIdentifierArgs ;
67
+ testIdentifier ?: TestIdentifierArgs ;
63
68
}
64
69
65
70
@Resolver ( _of => Test )
@@ -71,16 +76,16 @@ export class TestResolver {
71
76
const conn = this . conn . connection ( ) ;
72
77
const res = await conn . getTests ( args ) ;
73
78
return {
74
- list : res . map ( t => fromDoltTestRowRes ( t ) ) ,
79
+ list : res . map ( t => fromDoltTestRowRes ( args . databaseName , args . refName , t ) ) ,
75
80
} ;
76
81
}
77
82
78
83
@Query ( _returns => TestResultList )
79
- async runTests ( @Args ( ) args : RunTestsArgs ) {
84
+ async runTests ( @Args ( ) args : RunTestsArgs ) : Promise < TestResultList > {
80
85
const conn = this . conn . connection ( ) ;
81
86
const res = await conn . runTests ( args ) ;
82
87
return {
83
- list : res . map ( t => fromDoltTestResultRowRes ( t ) ) ,
88
+ list : res . map ( t => fromDoltTestResultRowRes ( args . databaseName , args . refName , t ) ) ,
84
89
} ;
85
90
}
86
91
@@ -89,7 +94,7 @@ export class TestResolver {
89
94
const conn = this . conn . connection ( ) ;
90
95
const res = await conn . saveTests ( args ) ;
91
96
return {
92
- list : res . generatedMaps . map ( t => fromDoltTestRowRes ( t ) ) ,
97
+ list : res . generatedMaps . map ( t => fromDoltTestRowRes ( args . databaseName , args . refName , t ) ) ,
93
98
} ;
94
99
}
95
100
}
0 commit comments