feat: Implement rest api endpoint to test step
This commit is contained in:
34
packages/backend/test/mocks/rest/api/v1/steps/test-step.js
Normal file
34
packages/backend/test/mocks/rest/api/v1/steps/test-step.js
Normal file
@@ -0,0 +1,34 @@
|
||||
const testStepMock = async (step, lastExecutionStep) => {
|
||||
const data = {
|
||||
id: step.id,
|
||||
appKey: step.appKey,
|
||||
key: step.key,
|
||||
iconUrl: step.iconUrl,
|
||||
lastExecutionStep: {
|
||||
id: lastExecutionStep.id,
|
||||
status: lastExecutionStep.status,
|
||||
dataIn: lastExecutionStep.dataIn,
|
||||
dataOut: lastExecutionStep.dataOut,
|
||||
errorDetails: lastExecutionStep.errorDetails,
|
||||
createdAt: lastExecutionStep.createdAt.getTime(),
|
||||
updatedAt: lastExecutionStep.updatedAt.getTime(),
|
||||
},
|
||||
parameters: step.parameters,
|
||||
position: step.position,
|
||||
status: step.status,
|
||||
type: step.type,
|
||||
};
|
||||
|
||||
return {
|
||||
data: data,
|
||||
meta: {
|
||||
count: 1,
|
||||
currentPage: null,
|
||||
isArray: false,
|
||||
totalPages: null,
|
||||
type: 'Step',
|
||||
},
|
||||
};
|
||||
};
|
||||
|
||||
export default testStepMock;
|
Reference in New Issue
Block a user