diff --git a/src/frontend/src/components/ui/refreshButton.tsx b/src/frontend/src/components/ui/refreshButton.tsx
index f0797f5d3..0439eafc5 100644
--- a/src/frontend/src/components/ui/refreshButton.tsx
+++ b/src/frontend/src/components/ui/refreshButton.tsx
@@ -48,6 +48,7 @@ function RefreshButton({
id={id}
size={"icon"}
loading={isLoading}
+ data-testid={id}
>
{button_text && {button_text}}
enabled transition
+ await page.getByTestId("refresh-button-api_endpoint").first().click();
+ await expect(
+ page.getByTestId("refresh-button-api_endpoint").first(),
+ ).toHaveAttribute("disabled", "");
+ await expect(
+ page.getByTestId("refresh-button-api_endpoint").first(),
+ ).not.toHaveAttribute("disabled", "");
+
+ // Click second refresh button and wait for disabled->enabled transition
+ await page.getByTestId("refresh-button-api_endpoint").last().click();
+ await expect(
+ page.getByTestId("refresh-button-api_endpoint").last(),
+ ).toHaveAttribute("disabled", "");
+ await expect(
+ page.getByTestId("refresh-button-api_endpoint").last(),
+ ).not.toHaveAttribute("disabled", "");
+
+ await page.getByTestId("dropdown_str_api_endpoint").first().click();
+
+ await page.waitForSelector('[data-testid="langflow-1-option"]', {
+ timeout: 100000,
+ });
+
+ await page.getByTestId("langflow-1-option").last().click();
+
+ await page.getByTestId("dropdown_str_api_endpoint").last().click();
+
+ await page.waitForSelector('[data-testid="langflow-1-option"]', {
+ timeout: 100000,
+ });
+
+ await page.getByTestId("langflow-1-option").last().click();
const fileChooserPromise = page.waitForEvent("filechooser");
await page.getByTestId("input-file-component").last().click();