Skip to content

Commit

Permalink
Add test coverage for inputs, outputs, and steps suggestions
Browse files Browse the repository at this point in the history
  • Loading branch information
davelopez committed Jun 22, 2024
1 parent 1f04d2a commit ccc886c
Showing 1 changed file with 39 additions and 0 deletions.
39 changes: 39 additions & 0 deletions server/gx-workflow-ls-format2/tests/integration/completion.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,45 @@ in$
expect(completions?.items[0].label).toBe("inputs");
});

it("should not suggest any properties when defining new workflow inputs", async () => {
const template = `
class: GalaxyWorkflow
inputs:
$
`;
const { contents, position } = parseTemplate(template);

const completions = await getCompletions(contents, position);

expect(completions?.items.length).toBe(0);
});

it("should not suggest any properties when defining new workflow outputs", async () => {
const template = `
class: GalaxyWorkflow
outputs:
$
`;
const { contents, position } = parseTemplate(template);

const completions = await getCompletions(contents, position);

expect(completions?.items.length).toBe(0);
});

it("should not suggest any properties when defining new workflow steps", async () => {
const template = `
class: GalaxyWorkflow
steps:
$
`;
const { contents, position } = parseTemplate(template);

const completions = await getCompletions(contents, position);

expect(completions?.items.length).toBe(0);
});

it("should not suggest property completions inlined with the definition", async () => {
const template = `
class: GalaxyWorkflow
Expand Down

0 comments on commit ccc886c

Please sign in to comment.