Merge pull request #2055 from automatisch/rest-test-step

feat: Implement rest api endpoint to test step
This commit is contained in:
Ömer Faruk Aydın
2024-09-02 15:22:10 +03:00
committed by GitHub
9 changed files with 303 additions and 1 deletions

View 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;