update_shared_step
Modify an existing shared step in QASE by updating its code, hash, title, action, expected result, data, or steps, ensuring accurate test management and integration.
Instructions
Update an existing shared step
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| action | Yes | ||
| code | Yes | ||
| data | No | ||
| expected_result | No | ||
| hash | Yes | ||
| steps | No | ||
| title | Yes |
Implementation Reference
- src/index.ts:432-435 (handler)Handler function for the update_shared_step tool that parses arguments using the schema and delegates to the updateSharedStep helper..with({ name: 'update_shared_step' }, ({ arguments: args }) => { const { code, hash, stepData } = UpdateSharedStepSchema.parse(args); return updateSharedStep(code, hash, stepData); })
- src/operations/shared-steps.ts:36-65 (schema)Zod input schema for update_shared_step, validates parameters and transforms to {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/index.ts:256-258 (registration)Tool registration in ListToolsRequestHandler, specifying name, description, and input schema.name: 'update_shared_step', description: 'Update an existing shared step', inputSchema: zodToJsonSchema(UpdateSharedStepSchema),
- src/operations/shared-steps.ts:82-85 (helper)Wrapper function that calls the Qase client to update a shared step and converts result using toResult utility.export const updateSharedStep = pipe( client.sharedSteps.updateSharedStep.bind(client.sharedSteps), toResult, );