diff --git a/src/frontend/src/components/core/flowToolbarComponent/components/deploy-dropdown.tsx b/src/frontend/src/components/core/flowToolbarComponent/components/deploy-dropdown.tsx index 670d64dc6..62618f95a 100644 --- a/src/frontend/src/components/core/flowToolbarComponent/components/deploy-dropdown.tsx +++ b/src/frontend/src/components/core/flowToolbarComponent/components/deploy-dropdown.tsx @@ -30,7 +30,7 @@ export default function PublishDropdown() { const flows = useFlowsManagerStore((state) => state.flows); const setFlows = useFlowsManagerStore((state) => state.setFlows); const setCurrentFlow = useFlowStore((state) => state.setCurrentFlow); - const isPublished = currentFlow?.access_type === "public"; + const isPublished = currentFlow?.access_type === "PUBLIC"; const hasIO = useFlowStore((state) => state.hasIO); const isAuth = useAuthStore((state) => !!state.autoLogin); const [openApiModal, setOpenApiModal] = useState(false); @@ -39,7 +39,7 @@ export default function PublishDropdown() { mutateAsync( { id: flowId ?? "", - access_type: checked ? "private" : "public", + access_type: checked ? "PRIVATE" : "PUBLIC", }, { onSuccess: (updatedFlow) => { @@ -179,19 +179,6 @@ export default function PublishDropdown() { - {/* -
- - Langflow SDK - -
-
*/} diff --git a/src/frontend/src/controllers/API/queries/flows/use-patch-update-flow.ts b/src/frontend/src/controllers/API/queries/flows/use-patch-update-flow.ts index c5100678f..2e4e8b8e0 100644 --- a/src/frontend/src/controllers/API/queries/flows/use-patch-update-flow.ts +++ b/src/frontend/src/controllers/API/queries/flows/use-patch-update-flow.ts @@ -13,7 +13,7 @@ interface IPatchUpdateFlow { folder_id?: string | null | undefined; endpoint_name?: string | null | undefined; locked?: boolean | null | undefined; - access_type?: "public" | "private" | "protected"; + access_type?: "PUBLIC" | "PRIVATE" | "PROTECTED"; } export const usePatchUpdateFlow: useMutationFunctionType< diff --git a/src/frontend/src/pages/Playground/index.tsx b/src/frontend/src/pages/Playground/index.tsx index 3de0a1e0f..11ca13c46 100644 --- a/src/frontend/src/pages/Playground/index.tsx +++ b/src/frontend/src/pages/Playground/index.tsx @@ -66,7 +66,7 @@ export default function PlaygroundPage() { ); if ( (inputs.length === 0 && outputs.length === 0) || - currentSavedFlow?.access_type !== "public" + currentSavedFlow?.access_type !== "PUBLIC" ) { // redirect to the home page navigate("/"); diff --git a/src/frontend/src/types/flow/index.ts b/src/frontend/src/types/flow/index.ts index c6aee4b50..d57e94003 100644 --- a/src/frontend/src/types/flow/index.ts +++ b/src/frontend/src/types/flow/index.ts @@ -32,7 +32,7 @@ export type FlowType = { webhook?: boolean; locked?: boolean | null; public?: boolean; - access_type?: "public" | "private" | "protected"; + access_type?: "PUBLIC" | "PRIVATE" | "PROTECTED"; }; export type GenericNodeType = Node; diff --git a/src/frontend/tests/core/features/publish-flow.spec.ts b/src/frontend/tests/core/features/publish-flow.spec.ts index 3179a8a8e..399485da9 100644 --- a/src/frontend/tests/core/features/publish-flow.spec.ts +++ b/src/frontend/tests/core/features/publish-flow.spec.ts @@ -60,8 +60,11 @@ test( await newPage.close(); await page.bringToFront(); // check if deactivate the publishworks + await page.waitForTimeout(500); await page.getByTestId("publish-button").click(); + await page.waitForTimeout(500); await page.getByTestId("publish-switch").click(); + await page.waitForTimeout(500); await expect(page.getByTestId("rf__wrapper")).toBeVisible(); await expect(page.getByTestId("publish-switch")).toBeChecked({ checked: false, diff --git a/src/frontend/tests/core/unit/floatComponent.spec.ts b/src/frontend/tests/core/unit/floatComponent.spec.ts index 72c496c64..1d4fa9b8c 100644 --- a/src/frontend/tests/core/unit/floatComponent.spec.ts +++ b/src/frontend/tests/core/unit/floatComponent.spec.ts @@ -33,6 +33,8 @@ test( await page.getByText("Close").last().click(); + await page.getByTestId("fit_view").click(); + await page.locator('//*[@id="int_int_seed"]').click(); await page.locator('//*[@id="int_int_seed"]').fill(""); await page.locator('//*[@id="int_int_seed"]').fill("3");