diff --git a/src/frontend/src/components/editFlowSettingsComponent/index.tsx b/src/frontend/src/components/editFlowSettingsComponent/index.tsx index d1fcc7100..c3016ed3e 100644 --- a/src/frontend/src/components/editFlowSettingsComponent/index.tsx +++ b/src/frontend/src/components/editFlowSettingsComponent/index.tsx @@ -62,7 +62,9 @@ export const EditFlowSettings: React.FC = ({ Character limit reached )} {isInvalidName && ( - Invalid name + + Name invalid or already exists + )} {setName ? ( diff --git a/src/frontend/src/modals/flowSettingsModal/index.tsx b/src/frontend/src/modals/flowSettingsModal/index.tsx index fb0435fc0..15e2672d2 100644 --- a/src/frontend/src/modals/flowSettingsModal/index.tsx +++ b/src/frontend/src/modals/flowSettingsModal/index.tsx @@ -65,8 +65,7 @@ export default function FlowSettingsModal({ if (flows) { const tempNameList: string[] = []; flows.forEach((flow: FlowType) => { - if ((flow.is_component ?? false) === false) - tempNameList.push(flow.name); + tempNameList.push(flow.name); }); setNameList(tempNameList.filter((name) => name !== currentFlow!.name)); } diff --git a/src/frontend/tests/extended/regression/generalBugs-shard-13.spec.ts b/src/frontend/tests/extended/regression/generalBugs-shard-13.spec.ts index c26b5851a..a2396b011 100644 --- a/src/frontend/tests/extended/regression/generalBugs-shard-13.spec.ts +++ b/src/frontend/tests/extended/regression/generalBugs-shard-13.spec.ts @@ -82,6 +82,42 @@ test("should be able to share a component on the store by clicking on the share await page.getByTestId("share-modal-button-flow").click(); + let replace = await page.getByTestId("replace-button").isVisible(); + + if (replace) { + await page.getByTestId("replace-button").click(); + } + + await page.waitForSelector("text=flow shared successfully ", { + timeout: 10000, + }); + + await page.waitForTimeout(500); + + await page.waitForSelector("text=share", { timeout: 10000 }); + await page.waitForSelector("text=playground", { timeout: 10000 }); + await page.waitForSelector("text=api", { timeout: 10000 }); + + await page.getByTestId("shared-button-flow").click(); + + await page.waitForTimeout(500); + + await page.waitForSelector("text=Publish workflow to the Langflow Store.", { + timeout: 10000, + }); + await page.waitForSelector('[data-testid="share-modal-button-flow"]', { + timeout: 10000, + }); + await page.waitForSelector("text=Share Flow", { timeout: 10000 }); + + await page.getByTestId("share-modal-button-flow").click(); + + replace = await page.getByTestId("replace-button").isVisible(); + + if (replace) { + await page.getByTestId("replace-button").click(); + } + await page.waitForSelector("text=flow shared successfully ", { timeout: 10000, });