You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
"Priority of the test case. Accepts either display name (e.g. 'Critical', 'High', 'Medium', 'Low') or internal name (e.g. 'medium'). If omitted, the project default (usually 'Medium') is applied. Valid values are per-project and discoverable via the form-fields endpoint.",
139
158
),
159
+
template: z
160
+
.string()
161
+
.optional()
162
+
.describe(
163
+
"Template internal slug, e.g. 'test_case_steps' or 'test_case_bdd'. Use the slug, not the display name.",
164
+
),
140
165
});
141
166
142
167
exportfunctionsanitizeArgs(args: any){
@@ -146,6 +171,7 @@ export function sanitizeArgs(args: any) {
// The TM API silently ignores an unrecognized template slug and falls back
277
+
// to the default. Surface that instead of letting it pass as success.
278
+
if(
279
+
params.template&&
280
+
tc.template&&
281
+
String(tc.template).toLowerCase()!==
282
+
String(params.template).toLowerCase()
283
+
){
284
+
content.push({
285
+
type: "text",
286
+
text: `Warning: requested template "${params.template}" was not applied — the test case was created with "${tc.template}". BrowserStack expects the template's internal slug (e.g. "test_case_steps", "test_case_bdd") and silently uses the default for unrecognized values.`,
287
+
});
288
+
}
289
+
290
+
content.push({
291
+
type: "text",
292
+
text: `Test case successfully created:
253
293
- Identifier: ${tc.identifier}
254
294
- Title: ${tc.title}
255
295
256
296
You can view it here: ${tmBaseUrl}/projects/${projectId}/folder/search?q=${tc.identifier}`,
0 commit comments