refactor: Improve Reactflow wrapping around toolbars, canvas controls, etc (#8130)
* update the wrapping of the reactflow * [autofix.ci] apply automated fixes * test button fix * [autofix.ci] apply automated fixes * selector fix * fix slash --------- Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
This commit is contained in:
parent
076b228599
commit
3889d5ff3b
36 changed files with 101 additions and 106 deletions
|
|
@ -33,8 +33,7 @@ test(
|
|||
await page.getByText("Chat Input", { exact: true }).click();
|
||||
await page.getByTestId("edit-button-modal").last().click();
|
||||
await page.getByText("Close").last().click();
|
||||
|
||||
await page.getByText("Playground", { exact: true }).last().click();
|
||||
await page.getByRole("button", { name: "Playground", exact: true }).click();
|
||||
|
||||
// Read the image file as a binary string
|
||||
const filePath = "tests/assets/chain.png";
|
||||
|
|
|
|||
|
|
@ -71,7 +71,7 @@ test(
|
|||
await page.getByTestId("handle-textoutput-shownode-message-right").click();
|
||||
await page.getByTestId("handle-chatoutput-noshownode-text-target").click();
|
||||
|
||||
await page.getByText("Playground", { exact: true }).last().click();
|
||||
await page.getByRole("button", { name: "Playground", exact: true }).click();
|
||||
await page.waitForSelector('[data-testid="input-chat-playground"]', {
|
||||
timeout: 100000,
|
||||
});
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@ test.describe("save component tests", () => {
|
|||
|
||||
// Now dispatch
|
||||
await page.dispatchEvent(
|
||||
"//*[@id='react-flow-id']/div[1]/div[1]/div",
|
||||
"//*[@data-testid='rf__wrapper']/div[1]/div",
|
||||
"drop",
|
||||
{
|
||||
dataTransfer,
|
||||
|
|
@ -48,9 +48,8 @@ test.describe("save component tests", () => {
|
|||
expect(true).toBeTruthy();
|
||||
}
|
||||
|
||||
await page
|
||||
.locator('//*[@id="react-flow-id"]/div[1]/div[2]/button[3]')
|
||||
.click();
|
||||
// Log button element
|
||||
await page.getByTestId("fit_view").click();
|
||||
|
||||
await zoomOut(page, 2);
|
||||
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ withEventDeliveryModes(
|
|||
timeout: 15000,
|
||||
});
|
||||
|
||||
await page.getByText("Playground", { exact: true }).last().click();
|
||||
await page.getByRole("button", { name: "Playground", exact: true }).click();
|
||||
await page
|
||||
.getByText("No input message provided.", { exact: true })
|
||||
.last()
|
||||
|
|
|
|||
|
|
@ -50,7 +50,7 @@ withEventDeliveryModes(
|
|||
timeout: 30000,
|
||||
});
|
||||
|
||||
await page.getByText("Playground", { exact: true }).last().click();
|
||||
await page.getByRole("button", { name: "Playground", exact: true }).click();
|
||||
await page
|
||||
.getByPlaceholder(
|
||||
"No chat input variables found. Click to run your flow.",
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@ withEventDeliveryModes(
|
|||
timeout: 15000,
|
||||
});
|
||||
|
||||
await page.getByText("Playground", { exact: true }).last().click();
|
||||
await page.getByRole("button", { name: "Playground", exact: true }).click();
|
||||
await page
|
||||
.getByText("No input message provided.", { exact: true })
|
||||
.last()
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@ test.skip(
|
|||
await page.getByText("built successfully").last().click({
|
||||
timeout: 15000,
|
||||
});
|
||||
await page.getByText("Playground", { exact: true }).last().click();
|
||||
await page.getByRole("button", { name: "Playground", exact: true }).click();
|
||||
await page.waitForTimeout(1000);
|
||||
expect(page.getByText("apple").last()).toBeVisible();
|
||||
const textContents = await page
|
||||
|
|
|
|||
|
|
@ -48,7 +48,7 @@ test.skip(
|
|||
timeout: 15000,
|
||||
});
|
||||
|
||||
await page.getByText("Playground", { exact: true }).last().click();
|
||||
await page.getByRole("button", { name: "Playground", exact: true }).click();
|
||||
|
||||
expect(await page.locator(".markdown").count()).toBeGreaterThan(0);
|
||||
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@ withEventDeliveryModes(
|
|||
|
||||
await initialGPTsetup(page);
|
||||
|
||||
await page.getByText("Playground", { exact: true }).last().click();
|
||||
await page.getByRole("button", { name: "Playground", exact: true }).click();
|
||||
|
||||
await page.waitForSelector('[data-testid="input-chat-playground"]', {
|
||||
timeout: 100000,
|
||||
|
|
|
|||
|
|
@ -50,7 +50,7 @@ test(
|
|||
timeout: 15000,
|
||||
});
|
||||
|
||||
await page.getByText("Playground", { exact: true }).last().click();
|
||||
await page.getByRole("button", { name: "Playground", exact: true }).click();
|
||||
await page
|
||||
.getByText("No input message provided.", { exact: true })
|
||||
.last()
|
||||
|
|
|
|||
|
|
@ -44,7 +44,7 @@ test(
|
|||
});
|
||||
|
||||
// Switch to Playground
|
||||
await page.getByText("Playground", { exact: true }).last().click();
|
||||
await page.getByRole("button", { name: "Playground", exact: true }).click();
|
||||
|
||||
// Wait for the playground to be ready
|
||||
const inputPlaceholder = page
|
||||
|
|
|
|||
|
|
@ -50,7 +50,7 @@ withEventDeliveryModes(
|
|||
timeout: 15000,
|
||||
});
|
||||
|
||||
await page.getByText("Playground", { exact: true }).last().click();
|
||||
await page.getByRole("button", { name: "Playground", exact: true }).click();
|
||||
await page
|
||||
.getByText("No input message provided.", { exact: true })
|
||||
.last()
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@ withEventDeliveryModes(
|
|||
timeout: 15000,
|
||||
});
|
||||
|
||||
await page.getByText("Playground", { exact: true }).last().click();
|
||||
await page.getByRole("button", { name: "Playground", exact: true }).click();
|
||||
|
||||
await page
|
||||
.getByText("No input message provided.", { exact: true })
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@ withEventDeliveryModes(
|
|||
timeout: 15000,
|
||||
});
|
||||
|
||||
await page.getByText("Playground", { exact: true }).last().click();
|
||||
await page.getByRole("button", { name: "Playground", exact: true }).click();
|
||||
await page
|
||||
.getByText("No input message provided.", { exact: true })
|
||||
.last()
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@ withEventDeliveryModes(
|
|||
timeout: 15000,
|
||||
});
|
||||
|
||||
await page.getByText("Playground", { exact: true }).last().click();
|
||||
await page.getByRole("button", { name: "Playground", exact: true }).click();
|
||||
await page
|
||||
.getByText("No input message provided.", { exact: true })
|
||||
.last()
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@ withEventDeliveryModes(
|
|||
timeout: 15000,
|
||||
});
|
||||
|
||||
await page.getByText("Playground", { exact: true }).last().click();
|
||||
await page.getByRole("button", { name: "Playground", exact: true }).click();
|
||||
await page
|
||||
.getByText("No input message provided.", { exact: true })
|
||||
.last()
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@ test.skip(
|
|||
timeout: 15000,
|
||||
});
|
||||
|
||||
await page.getByText("Playground", { exact: true }).last().click();
|
||||
await page.getByRole("button", { name: "Playground", exact: true }).click();
|
||||
|
||||
expect(await page.locator(".markdown").count()).toBeGreaterThan(0);
|
||||
|
||||
|
|
|
|||
|
|
@ -50,7 +50,7 @@ withEventDeliveryModes(
|
|||
timeout: 15000,
|
||||
});
|
||||
|
||||
await page.getByText("Playground", { exact: true }).last().click();
|
||||
await page.getByRole("button", { name: "Playground", exact: true }).click();
|
||||
await page
|
||||
.getByText("Add a Chat Input component to your flow to send messages.", {
|
||||
exact: true,
|
||||
|
|
|
|||
|
|
@ -71,7 +71,7 @@ withEventDeliveryModes(
|
|||
timeout: 15000,
|
||||
});
|
||||
|
||||
await page.getByText("Playground", { exact: true }).last().click();
|
||||
await page.getByRole("button", { name: "Playground", exact: true }).click();
|
||||
|
||||
await page.waitForSelector("text=default session", {
|
||||
timeout: 30000,
|
||||
|
|
|
|||
|
|
@ -41,7 +41,7 @@ withEventDeliveryModes(
|
|||
timeout: 15000,
|
||||
});
|
||||
|
||||
await page.getByText("Playground", { exact: true }).last().click();
|
||||
await page.getByRole("button", { name: "Playground", exact: true }).click();
|
||||
await page
|
||||
.getByText("No input message provided.", { exact: true })
|
||||
.last()
|
||||
|
|
|
|||
|
|
@ -254,7 +254,7 @@ withEventDeliveryModes(
|
|||
timeout: 30000,
|
||||
});
|
||||
|
||||
await page.getByText("Playground", { exact: true }).last().click();
|
||||
await page.getByRole("button", { name: "Playground", exact: true }).click();
|
||||
await page.waitForSelector('[data-testid="input-chat-playground"]', {
|
||||
timeout: 60000,
|
||||
});
|
||||
|
|
|
|||
|
|
@ -350,7 +350,7 @@ test(
|
|||
await page.getByTestId("dropdown_str_model_name").click();
|
||||
await page.getByTestId("gpt-4o-1-option").click();
|
||||
await page.getByTestId("fit_view").click();
|
||||
await page.getByText("Playground", { exact: true }).last().click();
|
||||
await page.getByRole("button", { name: "Playground", exact: true }).click();
|
||||
await page.waitForSelector('[data-testid="input-chat-playground"]', {
|
||||
timeout: 100000,
|
||||
});
|
||||
|
|
|
|||
|
|
@ -144,7 +144,7 @@ test.skip(
|
|||
await page.getByTestId("dropdown_str_model_name").click();
|
||||
await page.getByTestId("gpt-4o-1-option").click();
|
||||
await page.waitForTimeout(1000);
|
||||
await page.getByText("Playground", { exact: true }).last().click();
|
||||
await page.getByRole("button", { name: "Playground", exact: true }).click();
|
||||
await page.getByTestId("button_run_text_output").click();
|
||||
await page
|
||||
.getByTestId(/^rf__node-TextOutput-[a-zA-Z0-9]+$/)
|
||||
|
|
@ -167,7 +167,7 @@ test.skip(
|
|||
.getByTestId(/^rf__node-TextInput-[a-zA-Z0-9]+$/)
|
||||
.getByTestId("textarea_str_input_value")
|
||||
.fill("This is a test, again just to be sure!");
|
||||
await page.getByText("Playground", { exact: true }).last().click();
|
||||
await page.getByRole("button", { name: "Playground", exact: true }).click();
|
||||
await page.getByText("Run Flow", { exact: true }).click();
|
||||
await page.waitForTimeout(5000);
|
||||
textInputContent = await page
|
||||
|
|
|
|||
|
|
@ -105,7 +105,7 @@ AI:
|
|||
|
||||
await page.locator('//*[@id="react-flow-id"]').hover();
|
||||
|
||||
await page.getByText("Playground", { exact: true }).last().click();
|
||||
await page.getByRole("button", { name: "Playground", exact: true }).click();
|
||||
|
||||
await page.waitForSelector('[data-testid="button-send"]', {
|
||||
timeout: 100000,
|
||||
|
|
|
|||
|
|
@ -303,7 +303,7 @@ test(
|
|||
.first()
|
||||
.click();
|
||||
|
||||
await page.getByText("Playground", { exact: true }).last().click();
|
||||
await page.getByRole("button", { name: "Playground", exact: true }).click();
|
||||
|
||||
await page.waitForSelector("text=Run Flow", {
|
||||
timeout: 30000,
|
||||
|
|
@ -369,7 +369,9 @@ test(
|
|||
timeout: 1000,
|
||||
});
|
||||
await page.getByTestId(`remove-file-button-${renamedTxtFile}`).click();
|
||||
await page.getByText("Playground", { exact: true }).last().click();
|
||||
await page
|
||||
.getByRole("button", { name: "Playground", exact: true })
|
||||
.click();
|
||||
await page.getByTestId("icon-MoreHorizontal").last().click();
|
||||
await page.getByText("Delete", { exact: true }).last().click();
|
||||
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ test(
|
|||
await page.mouse.up();
|
||||
await page.mouse.down();
|
||||
|
||||
await page.locator('//*[@id="react-flow-id"]/div/div[2]/button[3]').click();
|
||||
await page.getByTestId("fit_view").click();
|
||||
|
||||
await adjustScreenView(page);
|
||||
await page.getByTestId("generic-node-title-arrangement").click();
|
||||
|
|
|
|||
|
|
@ -44,7 +44,7 @@ test(
|
|||
await page.getByTestId("edit-button-modal").last().click();
|
||||
await page.getByText("Close").last().click();
|
||||
|
||||
await page.getByText("Playground", { exact: true }).last().click();
|
||||
await page.getByRole("button", { name: "Playground", exact: true }).click();
|
||||
|
||||
// Read the image file as a binary string
|
||||
const filePath = "tests/assets/chain.png";
|
||||
|
|
|
|||
|
|
@ -109,7 +109,7 @@ class CustomComponent(Component):
|
|||
|
||||
await page.getByTestId("button_run_chat output").click();
|
||||
|
||||
await page.getByText("Playground", { exact: true }).last().click();
|
||||
await page.getByRole("button", { name: "Playground", exact: true }).click();
|
||||
|
||||
await page.waitForSelector('[data-testid="button-stop"]', {
|
||||
timeout: 30000,
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ test(
|
|||
|
||||
await initialGPTsetup(page);
|
||||
|
||||
await page.getByText("Playground", { exact: true }).last().click();
|
||||
await page.getByRole("button", { name: "Playground", exact: true }).click();
|
||||
|
||||
await page.waitForSelector('[data-testid="input-chat-playground"]', {
|
||||
timeout: 100000,
|
||||
|
|
@ -56,7 +56,7 @@ test(
|
|||
.fill(
|
||||
"testtesttesttesttesttestte;.;.,;,.;,.;.,;,..,;;;;;;;;;;;;;;;;;;;;;,;.;,.;,.,;.,;.;.,~~çççççççççççççççççççççççççççççççççççççççisdajfdasiopjfaodisjhvoicxjiovjcxizopjviopasjioasfhjaiohf23432432432423423sttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttestççççççççççççççççççççççççççççççççç,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,!",
|
||||
);
|
||||
await page.getByText("Playground", { exact: true }).last().click();
|
||||
await page.getByRole("button", { name: "Playground", exact: true }).click();
|
||||
|
||||
await page.waitForSelector('[data-testid="button-send"]', {
|
||||
timeout: 100000,
|
||||
|
|
@ -83,7 +83,7 @@ test(
|
|||
.nth(0)
|
||||
.fill("TestSenderNameAI");
|
||||
|
||||
await page.getByText("Playground", { exact: true }).last().click();
|
||||
await page.getByRole("button", { name: "Playground", exact: true }).click();
|
||||
|
||||
await page.waitForSelector('[data-testid="button-send"]', {
|
||||
timeout: 100000,
|
||||
|
|
|
|||
|
|
@ -41,7 +41,7 @@ test(
|
|||
timeout: 15000,
|
||||
});
|
||||
|
||||
await page.getByText("Playground", { exact: true }).last().click();
|
||||
await page.getByRole("button", { name: "Playground", exact: true }).click();
|
||||
|
||||
await page.waitForSelector('[data-testid="button-send"]', {
|
||||
timeout: 100000,
|
||||
|
|
|
|||
|
|
@ -81,7 +81,7 @@ test(
|
|||
.click();
|
||||
|
||||
await page.getByTestId("fit_view").click();
|
||||
await page.getByText("Playground", { exact: true }).last().click();
|
||||
await page.getByRole("button", { name: "Playground", exact: true }).click();
|
||||
await page.waitForSelector('[data-testid="input-chat-playground"]', {
|
||||
timeout: 100000,
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue