fix: Improve test accuracy with component generation steps and robust assertions (nightly fix) (#7156)

 (Custom Component Generator.spec.ts): Add test case for filling input with custom component description before sending
 (nestedComponent.spec.ts): Add test case for toggling legacy switch in sidebar options and checking if it is checked after clicking
This commit is contained in:
Cristhian Zanforlin Lousa 2025-03-19 07:06:19 -03:00 committed by GitHub
commit 41ed0bb50b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 18 additions and 1 deletions

View file

@ -52,6 +52,13 @@ withEventDeliveryModes(
await page.getByTestId("playground-btn-flow-io").click();
await page
.getByTestId("input-chat-playground")
.last()
.fill(
"Create a custom component that can generate a random number between 1 and 100 and is called Langflow Random Number",
);
await page.getByTestId("button-send").last().click();
await page.waitForTimeout(1000);
@ -64,6 +71,6 @@ withEventDeliveryModes(
expect(await page.getByTestId("chat-code-tab").last().isVisible()).toBe(
true,
);
expect(textContents).toContain("langflow");
expect(textContents.toLowerCase()).toContain("langflow");
},
);

View file

@ -15,6 +15,16 @@ test(
await page.getByTestId("sidebar-search-input").click();
await page.getByTestId("sidebar-search-input").fill("alter metadata");
await page.getByTestId("sidebar-options-trigger").click();
await page
.getByTestId("sidebar-legacy-switch")
.isVisible({ timeout: 5000 });
await page.getByTestId("sidebar-legacy-switch").click();
await expect(page.getByTestId("sidebar-legacy-switch")).toBeChecked();
await page.getByTestId("sidebar-options-trigger").click();
await page.waitForTimeout(500);
await page.waitForSelector('[data-testid="processingAlter Metadata"]', {
timeout: 3000,
});