refactor: Remove test run methods from triggers

This commit is contained in:
Faruk AYDIN
2022-10-14 23:41:00 +02:00
committed by Ali BARIN
parent c422ca530d
commit cad42eed54
5 changed files with 1 additions and 23 deletions

View File

@@ -23,8 +23,4 @@ export default {
lastInternalId: $.flow.lastInternalId, lastInternalId: $.flow.lastInternalId,
}); });
}, },
async testRun($: IGlobalVariable) {
return await getUserTweets($, { currentUser: true });
},
}; };

View File

@@ -20,8 +20,4 @@ export default {
async run($: IGlobalVariable) { async run($: IGlobalVariable) {
return await myFollowers($, $.flow.lastInternalId); return await myFollowers($, $.flow.lastInternalId);
}, },
async testRun($: IGlobalVariable) {
return await myFollowers($);
},
}; };

View File

@@ -35,10 +35,4 @@ export default {
searchTerm: $.step.parameters.searchTerm as string, searchTerm: $.step.parameters.searchTerm as string,
}); });
}, },
async testRun($: IGlobalVariable) {
return await searchTweets($, {
searchTerm: $.step.parameters.searchTerm as string,
});
},
}; };

View File

@@ -36,11 +36,4 @@ export default {
lastInternalId: $.flow.lastInternalId, lastInternalId: $.flow.lastInternalId,
}); });
}, },
async testRun($: IGlobalVariable) {
return await getUserTweets($, {
currentUser: false,
userId: $.step.parameters.username as string,
});
},
}; };

View File

@@ -208,7 +208,6 @@ export interface ITrigger {
substeps: ISubstep[]; substeps: ISubstep[];
getInterval(parameters: IGlobalVariable['step']['parameters']): string; getInterval(parameters: IGlobalVariable['step']['parameters']): string;
run($: IGlobalVariable): Promise<ITriggerOutput>; run($: IGlobalVariable): Promise<ITriggerOutput>;
testRun($: IGlobalVariable): Promise<ITriggerOutput>;
} }
export interface IActionOutput { export interface IActionOutput {
@@ -271,7 +270,7 @@ export type IGlobalVariable = {
execution?: { execution?: {
id: string; id: string;
testRun: boolean; testRun: boolean;
} };
process?: (triggerDataItem: ITriggerDataItem) => Promise<void>; process?: (triggerDataItem: ITriggerDataItem) => Promise<void>;
}; };