updateCase
codebolt.autoTesting.updateCase(params: IUpdateCaseParams): Promise<IUpdateCaseResponse>
Updates an existing test case's properties or steps.
Parameters
params(IUpdateCaseParams): Parameters including case ID and fields to update.
Returns
Promise<[IUpdateCaseResponse](/docs/reference/type-reference/codeboltjs/interfaces/IUpdateCaseResponse)>: A promise that resolves to the updated test case.
Examples
// Update name
await codebolt.autoTesting.updateCase({
id: 'case-123',
name: 'Updated Test Name'
});
// Update steps
await codebolt.autoTesting.updateCase({
id: 'case-123',
steps: [
{ id: 'step-1', content: 'Updated step 1', order: 1 },
{ content: 'New step', order: 2 }
]
});
Notes
- Steps with IDs update existing steps
- Steps without IDs create new steps
- Replaces entire steps array