Skip to content

Commit

Permalink
fix failing WorkflowInvocationHeader jest
Browse files Browse the repository at this point in the history
- Adjust props
- Remove the return to invocation list jest, we will be removing that button soon
  • Loading branch information
ahmedhamidawan committed Nov 5, 2024
1 parent 7758ae9 commit 16f9640
Showing 1 changed file with 5 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,12 @@ async function mountWorkflowInvocationHeader(ownsWorkflow = true, hasReturnBtn =
...sampleInvocation,
workflow_id: !unimportableWorkflow ? sampleInvocation.workflow_id : UNIMPORTABLE_WORKFLOW_INSTANCE_ID,
},
invocationState: "scheduled",
isFullPage: true,
jobStatesSummary: {},
fromPanel: !hasReturnBtn,
invocationSchedulingTerminal: true,
invocationAndJobTerminal: true,
},
localVue,
pinia: createTestingPinia(),
Expand All @@ -102,12 +107,6 @@ describe("WorkflowInvocationHeader renders", () => {
expect(runButton.attributes("title")).toContain(SAMPLE_WORKFLOW.name);
});

it("return to invocations list button if not from panel", async () => {
const { wrapper } = await mountWorkflowInvocationHeader(false, true);
const returnButton = wrapper.find(SELECTORS.RETURN_TO_INVOCATIONS_LIST_BUTTON);
expect(returnButton.text()).toBe("Invocations List");
});

it("edit button if user owns the workflow", async () => {
const { wrapper } = await mountWorkflowInvocationHeader();
const actionsGroup = wrapper.find(SELECTORS.ACTIONS_BUTTON_GROUP);
Expand Down

0 comments on commit 16f9640

Please sign in to comment.