diff --git a/client/src/components/Workflow/Editor/Attributes.test.js b/client/src/components/Workflow/Editor/Attributes.test.js index 13dc05ce7eb0..d4f15b07be9b 100644 --- a/client/src/components/Workflow/Editor/Attributes.test.js +++ b/client/src/components/Workflow/Editor/Attributes.test.js @@ -1,5 +1,6 @@ import { mount, createLocalVue } from "@vue/test-utils"; import Attributes from "./Attributes"; +import { LegacyParameters } from "./modules/utilities"; jest.mock("app"); @@ -9,12 +10,15 @@ const TEST_NAME = "workflow_name"; describe("Attributes", () => { it("test attributes", async () => { const localVue = createLocalVue(); + const legacyParameters = new LegacyParameters(); + legacyParameters.getParameter("workflow_parameter_0"); + legacyParameters.getParameter("workflow_parameter_1"); const wrapper = mount(Attributes, { propsData: { id: "workflow_id", name: TEST_NAME, tags: ["workflow_tag_0", "workflow_tag_1"], - parameters: ["workflow_parameter_0", "workflow_parameter_1"], + parameters: legacyParameters, versions: ["workflow_version_0"], annotation: TEST_ANNOTATION, }, diff --git a/client/src/components/Workflow/Editor/Attributes.vue b/client/src/components/Workflow/Editor/Attributes.vue index 53e3b4be7425..e2ef3e7dd933 100644 --- a/client/src/components/Workflow/Editor/Attributes.vue +++ b/client/src/components/Workflow/Editor/Attributes.vue @@ -19,8 +19,8 @@
Parameters - {{ key + 1 }}: {{ p }} + {{ key + 1 }}: {{ p.name }}
@@ -59,6 +59,7 @@ import Vue from "vue"; import BootstrapVue from "bootstrap-vue"; import moment from "moment"; import { Services } from "components/Workflow/services"; +import { LegacyParameters } from "components/Workflow/Editor/modules/utilities"; import Tags from "components/Common/Tags"; import LicenseSelector from "components/License/LicenseSelector"; import CreatorEditor from "components/SchemaOrg/CreatorEditor"; @@ -104,7 +105,7 @@ export default { default: null, }, parameters: { - type: Array, + type: LegacyParameters, default: null, }, }, @@ -132,7 +133,7 @@ export default { return creator; }, hasParameters() { - return this.parameters.length > 0; + return this.parameters && this.parameters.parameters.length > 0; }, versionOptions() { const versions = []; diff --git a/client/src/components/Workflow/Editor/Index.vue b/client/src/components/Workflow/Editor/Index.vue index 837c3bbb88d5..801a5b99cd18 100644 --- a/client/src/components/Workflow/Editor/Index.vue +++ b/client/src/components/Workflow/Editor/Index.vue @@ -93,6 +93,7 @@ @onLayout="onLayout" @onEdit="onEdit" @onAttributes="onAttributes" + @onLint="onLint" /> @@ -115,6 +116,19 @@ @onLicense="onLicense" @onCreator="onCreator" /> +