Rename cron to schedule

This commit is contained in:
Beth Brennan
2022-12-19 13:03:15 -05:00
parent e9fd1022e0
commit 695be05672
2 changed files with 3 additions and 3 deletions
@@ -368,7 +368,7 @@ jobs:
const result = await complete(...getPositionFromCursor(input), undefined, undefined);
expect(result.map(x => x.label)).not.toContain("inputs");
expect(result.map(x => x.label)).not.toContain("cron");
expect(result.map(x => x.label)).not.toContain("schedule");
});
it("includes cron schedules", async () => {
@@ -387,7 +387,7 @@ jobs:
const result = await complete(...getPositionFromCursor(input), undefined, undefined);
expect(result.map(x => x.label)).toContain("cron");
expect(result.map(x => x.label)).toContain("schedule");
});
});
@@ -70,7 +70,7 @@ function getEventContext(workflowContext: WorkflowContext): ExpressionData {
if (schedule && schedule.length > 0) {
const default_cron = schedule[0].cron;
// For now, default to the first cron expression only
d.add("cron", new data.StringData(default_cron));
d.add("schedule", new data.StringData(default_cron));
}
return d;