update_shared_step
Modify existing shared test steps in QASE test management to maintain consistent testing procedures across multiple test cases.
Instructions
Update an existing shared step
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| code | Yes | ||
| hash | Yes | ||
| title | Yes | ||
| action | Yes | ||
| expected_result | No | ||
| data | No | ||
| steps | No |
Implementation Reference
- src/index.ts:432-435 (handler)MCP tool handler for 'update_shared_step' that parses input arguments using the schema and delegates to the updateSharedStep helper function..with({ name: 'update_shared_step' }, ({ arguments: args }) => { const { code, hash, stepData } = UpdateSharedStepSchema.parse(args); return updateSharedStep(code, hash, stepData); })
- src/index.ts:255-259 (registration)Tool registration in the ListToolsRequestHandler, defining the tool name, description, and input schema.{ name: 'update_shared_step', description: 'Update an existing shared step', inputSchema: zodToJsonSchema(UpdateSharedStepSchema), },
- src/operations/shared-steps.ts:36-65 (schema)Input schema validation using Zod, transforms to the format expected by the client: {code, hash, stepData: SharedStepUpdate}.export const UpdateSharedStepSchema = z .object({ code: z.string(), hash: z.string(), title: z.string(), action: z.string(), expected_result: z.string().optional(), data: z.string().optional(), steps: z .array( z.object({ action: z.string(), expected_result: z.string().optional(), data: z.string().optional(), position: z.number().optional(), }), ) .optional(), }) .transform((data) => ({ code: data.code, hash: data.hash, stepData: { title: data.title, action: data.action, expected_result: data.expected_result, data: data.data, steps: data.steps, } as SharedStepUpdate, }));
- src/operations/shared-steps.ts:82-85 (helper)Helper function that wraps the Qase client call to updateSharedStep and applies result transformation.export const updateSharedStep = pipe( client.sharedSteps.updateSharedStep.bind(client.sharedSteps), toResult, );