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:
parent
db4b064821
commit
41ed0bb50b
2 changed files with 18 additions and 1 deletions
|
|
@ -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");
|
||||
},
|
||||
);
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue