@@ -10,7 +10,9 @@ import { formatAxiosError } from "../../lib/error";
10
10
export const ListTestCasesSchema = z . object ( {
11
11
project_identifier : z
12
12
. string ( )
13
- . describe ( "Identifier of the project to fetch test cases from." ) ,
13
+ . describe (
14
+ "Identifier of the project to fetch test cases from. Example: PR-12345" ,
15
+ ) ,
14
16
folder_id : z
15
17
. string ( )
16
18
. optional ( )
@@ -25,19 +27,8 @@ export const ListTestCasesSchema = z.object({
25
27
. string ( )
26
28
. optional ( )
27
29
. describe ( "Comma-separated list of priorities (e.g. critical,medium,low)." ) ,
28
- status : z
29
- . string ( )
30
- . optional ( )
31
- . describe ( "Comma-separated list of statuses (e.g. draft,active)." ) ,
32
- tags : z . string ( ) . optional ( ) . describe ( "Comma-separated list of tags." ) ,
33
- owner : z . string ( ) . optional ( ) . describe ( "Owner email to filter by." ) ,
30
+
34
31
p : z . number ( ) . optional ( ) . describe ( "Page number." ) ,
35
- custom_fields : z
36
- . record ( z . array ( z . string ( ) ) )
37
- . optional ( )
38
- . describe (
39
- "Map of custom field names to arrays of values, e.g. { estimate: ['10','20'], 'automation type': ['automated'] }" ,
40
- ) ,
41
32
} ) ;
42
33
43
34
export type ListTestCasesArgs = z . infer < typeof ListTestCasesSchema > ;
@@ -54,15 +45,7 @@ export async function listTestCases(
54
45
if ( args . folder_id ) params . append ( "folder_id" , args . folder_id ) ;
55
46
if ( args . case_type ) params . append ( "case_type" , args . case_type ) ;
56
47
if ( args . priority ) params . append ( "priority" , args . priority ) ;
57
- if ( args . status ) params . append ( "status" , args . status ) ;
58
- if ( args . tags ) params . append ( "tags" , args . tags ) ;
59
- if ( args . owner ) params . append ( "owner" , args . owner ) ;
60
48
if ( args . p !== undefined ) params . append ( "p" , args . p . toString ( ) ) ;
61
- if ( args . custom_fields ) {
62
- for ( const [ field , values ] of Object . entries ( args . custom_fields ) ) {
63
- params . append ( `custom_fields[${ field } ]` , values . join ( "," ) ) ;
64
- }
65
- }
66
49
67
50
const url = `https://test-management.browserstack.com/api/v2/projects/${ encodeURIComponent (
68
51
args . project_identifier ,
@@ -96,7 +79,7 @@ export async function listTestCases(
96
79
const summary = test_cases
97
80
. map (
98
81
( tc : any ) =>
99
- `• ${ tc . identifier } : ${ tc . title } [${ tc . case_type } | ${ tc . status } | ${ tc . priority } ]` ,
82
+ `• ${ tc . identifier } : ${ tc . title } [${ tc . case_type } | ${ tc . priority } ]` ,
100
83
)
101
84
. join ( "\n" ) ;
102
85
0 commit comments