From 21542927b3fbb3003aa01b7d9fef1ca48b7eca38 Mon Sep 17 00:00:00 2001 From: Ahmed Awan Date: Thu, 3 Oct 2024 13:50:43 -0500 Subject: [PATCH] fix function name --- .../WorkflowInvocationHeader.test.ts | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/client/src/components/WorkflowInvocationState/WorkflowInvocationHeader.test.ts b/client/src/components/WorkflowInvocationState/WorkflowInvocationHeader.test.ts index a0d325455b81..f6308952b587 100644 --- a/client/src/components/WorkflowInvocationState/WorkflowInvocationHeader.test.ts +++ b/client/src/components/WorkflowInvocationState/WorkflowInvocationHeader.test.ts @@ -67,7 +67,7 @@ const localVue = getLocalVue(); * @param unimportableWorkflow Whether the workflow import should fail * @returns The wrapper object */ -async function mountWorkflowRunButton(ownsWorkflow = true, hasReturnBtn = false, unimportableWorkflow = false) { +async function mountWorkflowInvocationHeader(ownsWorkflow = true, hasReturnBtn = false, unimportableWorkflow = false) { const wrapper = shallowMount(WorkflowInvocationHeader as object, { propsData: { invocation: { @@ -96,7 +96,7 @@ async function mountWorkflowRunButton(ownsWorkflow = true, hasReturnBtn = false, describe("WorkflowInvocationHeader renders", () => { // Included both cases in one test because these are always constant it("(always) the workflow name in header and run button in actions", async () => { - const { wrapper } = await mountWorkflowRunButton(); + const { wrapper } = await mountWorkflowInvocationHeader(); const heading = wrapper.find(SELECTORS.INVOKED_WORKFLOW_HEADING); expect(heading.text()).toBe(`Invoked Workflow: "${SAMPLE_WORKFLOW.name}"`); @@ -107,13 +107,13 @@ describe("WorkflowInvocationHeader renders", () => { }); it("return to invocations list button if not from panel", async () => { - const { wrapper } = await mountWorkflowRunButton(false, true); + 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 mountWorkflowRunButton(); + const { wrapper } = await mountWorkflowInvocationHeader(); const actionsGroup = wrapper.find(SELECTORS.ACTIONS_BUTTON_GROUP); const editButton = actionsGroup.find(SELECTORS.EDIT_WORKFLOW_BUTTON); expect(editButton.attributes("to")).toBe( @@ -122,7 +122,7 @@ describe("WorkflowInvocationHeader renders", () => { }); it("import button instead if user does not own the workflow", async () => { - const { wrapper } = await mountWorkflowRunButton(false); + const { wrapper } = await mountWorkflowInvocationHeader(false); const actionsGroup = wrapper.find(SELECTORS.ACTIONS_BUTTON_GROUP); const importButton = actionsGroup.find(SELECTORS.IMPORT_WORKFLOW_BUTTON); expect(importButton.exists()).toBe(true); @@ -131,7 +131,7 @@ describe("WorkflowInvocationHeader renders", () => { describe("Importing a workflow in WorkflowInvocationHeader", () => { it("should show a confirmation dialog when the import is successful", async () => { - const { wrapper } = await mountWorkflowRunButton(false); + const { wrapper } = await mountWorkflowInvocationHeader(false); const actionsGroup = wrapper.find(SELECTORS.ACTIONS_BUTTON_GROUP); const importButton = actionsGroup.find(SELECTORS.IMPORT_WORKFLOW_BUTTON); @@ -145,7 +145,7 @@ describe("Importing a workflow in WorkflowInvocationHeader", () => { }); it("should show an error dialog when the import fails", async () => { - const { wrapper } = await mountWorkflowRunButton(false, false, true); + const { wrapper } = await mountWorkflowInvocationHeader(false, false, true); const actionsGroup = wrapper.find(SELECTORS.ACTIONS_BUTTON_GROUP); const importButton = actionsGroup.find(SELECTORS.IMPORT_WORKFLOW_BUTTON);