feat: Flow's canvas actions design uplift (#4260)

* init

* move panels and make custom

* post review changes

* [autofix.ci] apply automated fixes

* pr comment fix

* design review fixes

* [autofix.ci] apply automated fixes

* action toolbar positioning feedback

* [autofix.ci] apply automated fixes

* remove extra imports

* test selector updates

* missed a couple

* one more

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
This commit is contained in:
Mike Fortman 2024-10-30 19:51:33 -05:00 • committed by GitHub
commit 20b3a6b46e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
75 changed files with 584 additions and 452 deletions

View file

@ -36,14 +36,14 @@ test("user must be able to send an image on chat using advanced tool on ChatInpu
await page.getByTestId("side_nav_options_all-templates").click();
await page.getByRole("heading", { name: "Basic Prompting" }).click();
await page.waitForSelector('[title="fit view"]', {
await page.waitForSelector('[data-testid="fit_view"]', {
timeout: 100000,
});
await page.getByTitle("fit view").click();
await page.getByTitle("zoom out").click();
await page.getByTitle("zoom out").click();
await page.getByTitle("zoom out").click();
await page.getByTestId("fit_view").click();
await page.getByTestId("zoom_out").click();
await page.getByTestId("zoom_out").click();
await page.getByTestId("zoom_out").click();
let outdatedComponents = await page.getByTestId("icon-AlertTriangle").count();

View file

@ -37,14 +37,14 @@ test("should delete rows from table message", async ({ page }) => {
await page.getByTestId("side_nav_options_all-templates").click();
await page.getByRole("heading", { name: "Basic Prompting" }).click();
await page.waitForSelector('[title="fit view"]', {
await page.waitForSelector('[data-testid="fit_view"]', {
timeout: 100000,
});
await page.getByTitle("fit view").click();
await page.getByTitle("zoom out").click();
await page.getByTitle("zoom out").click();
await page.getByTitle("zoom out").click();
await page.getByTestId("fit_view").click();
await page.getByTestId("zoom_out").click();
await page.getByTestId("zoom_out").click();
await page.getByTestId("zoom_out").click();
let outdatedComponents = await page.getByTestId("icon-AlertTriangle").count();

View file

@ -38,7 +38,7 @@ test("freeze must work correctly", async ({ page }) => {
await page.getByRole("heading", { name: "Basic Prompting" }).click();
await page.waitForTimeout(1000);
await page.getByTitle("fit view").click();
await page.getByTestId("fit_view").click();
await page.getByText("openai").first().click();
await page.keyboard.press("Delete");

View file

@ -46,9 +46,9 @@ test("user should be able to use ComposIO without getting api_key error", async
await page.mouse.up();
await page.mouse.down();
await page.getByTitle("fit view").click();
await page.getByTitle("zoom out").click();
await page.getByTitle("zoom out").click();
await page.getByTestId("fit_view").click();
await page.getByTestId("zoom_out").click();
await page.getByTestId("zoom_out").click();
await page.waitForTimeout(1000);
@ -99,9 +99,9 @@ test("user should be able to use connect tools", async ({ page }) => {
await page.mouse.up();
await page.mouse.down();
await page.getByTitle("fit view").click();
await page.getByTitle("zoom out").click();
await page.getByTitle("zoom out").click();
await page.getByTestId("fit_view").click();
await page.getByTestId("zoom_out").click();
await page.getByTestId("zoom_out").click();
await page.waitForTimeout(1000);
@ -117,9 +117,9 @@ test("user should be able to use connect tools", async ({ page }) => {
await page.mouse.up();
await page.mouse.down();
await page.getByTitle("fit view").click();
await page.getByTitle("zoom out").click();
await page.getByTitle("zoom out").click();
await page.getByTestId("fit_view").click();
await page.getByTestId("zoom_out").click();
await page.getByTestId("zoom_out").click();
//connection
const searchApiOutput = await page

View file

@ -46,12 +46,12 @@ test("user should be able to connect RetrieverTool to another components", async
await page.mouse.up();
await page.mouse.down();
await page.getByTitle("fit view").click();
await page.getByTitle("zoom out").click();
await page.getByTestId("fit_view").click();
await page.getByTestId("zoom_out").click();
await page.waitForTimeout(1000);
await page.getByTitle("zoom out").click();
await page.getByTestId("zoom_out").click();
await page
.locator('//*[@id="react-flow-id"]')
.hover()
@ -76,8 +76,8 @@ test("user should be able to connect RetrieverTool to another components", async
await page.waitForTimeout(1000);
await page.getByTitle("fit view").click();
await page.getByTitle("fit view").click();
await page.getByTestId("fit_view").click();
await page.getByTestId("fit_view").click();
//connection
const chromaDbOutput = await page

View file

@ -52,14 +52,14 @@ test("should use webhook component on API", async ({ page }) => {
await page.mouse.up();
await page.mouse.down();
await page.waitForSelector('[title="fit view"]', {
await page.waitForSelector('[data-testid="fit_view"]', {
timeout: 100000,
});
await page.getByTitle("fit view").click();
await page.getByTitle("zoom out").click();
await page.getByTitle("zoom out").click();
await page.getByTitle("zoom out").click();
await page.getByTestId("fit_view").click();
await page.getByTestId("zoom_out").click();
await page.getByTestId("zoom_out").click();
await page.getByTestId("zoom_out").click();
await page.waitForTimeout(1000);
await page.getByText("API", { exact: true }).click();

View file

@ -57,10 +57,10 @@ test("should copy code from playground modal", async ({ page }) => {
await page.mouse.up();
await page.mouse.down();
await page.getByTitle("fit view").click();
await page.getByTitle("zoom out").click();
await page.getByTitle("zoom out").click();
await page.getByTitle("zoom out").click();
await page.getByTestId("fit_view").click();
await page.getByTestId("zoom_out").click();
await page.getByTestId("zoom_out").click();
await page.getByTestId("zoom_out").click();
await page.getByPlaceholder("Search").click();
await page.getByPlaceholder("Search").fill("chat input");
@ -76,10 +76,10 @@ test("should copy code from playground modal", async ({ page }) => {
await page.getByPlaceholder("Search").fill("openai");
await page.waitForTimeout(1000);
await page.getByTitle("fit view").click();
await page.getByTitle("zoom out").click();
await page.getByTitle("zoom out").click();
await page.getByTitle("zoom out").click();
await page.getByTestId("fit_view").click();
await page.getByTestId("zoom_out").click();
await page.getByTestId("zoom_out").click();
await page.getByTestId("zoom_out").click();
await page
.getByTestId("modelsOpenAI")
@ -87,15 +87,15 @@ test("should copy code from playground modal", async ({ page }) => {
await page.mouse.up();
await page.mouse.down();
await page.waitForSelector('[title="fit view"]', {
await page.waitForSelector('[data-testid="fit_view"]', {
timeout: 100000,
});
await page.getByTitle("fit view").click();
await page.getByTitle("zoom out").click();
await page.getByTitle("zoom out").click();
await page.getByTitle("zoom out").click();
await page.getByTitle("zoom out").click();
await page.getByTestId("fit_view").click();
await page.getByTestId("zoom_out").click();
await page.getByTestId("zoom_out").click();
await page.getByTestId("zoom_out").click();
await page.getByTestId("zoom_out").click();
let outdatedComponents = await page.getByTestId("icon-AlertTriangle").count();
@ -126,8 +126,8 @@ test("should copy code from playground modal", async ({ page }) => {
}
// Click and hold on the first element
await page.getByTitle("zoom in").click();
await page.getByTitle("zoom in").click();
await page.getByTestId("zoom_in").click();
await page.getByTestId("zoom_in").click();
await visibleElementHandle.hover();
await page.mouse.down();
@ -176,7 +176,7 @@ test("should copy code from playground modal", async ({ page }) => {
// await visibleElementHandle.hover();
await page.mouse.up();
await page.getByLabel("fit view").click();
await page.getByTestId("fit_view").click();
await page.getByText("Playground", { exact: true }).last().click();
await page.waitForSelector('[data-testid="input-chat-playground"]', {
timeout: 100000,
@ -256,7 +256,7 @@ test("playground button should be enabled or disabled", async ({ page }) => {
.dragTo(page.locator('//*[@id="react-flow-id"]'));
await page.mouse.up();
await page.mouse.down();
await page.waitForSelector('[title="fit view"]', {
await page.waitForSelector('[data-testid="fit_view"]', {
timeout: 100000,
});

View file

@ -40,8 +40,8 @@ test("should be able to see error when something goes wrong on Code Modal", asyn
.getByTestId("helpersCustom Component")
.dragTo(page.locator('//*[@id="react-flow-id"]'));
await page.getByTitle("zoom out").click();
await page.getByTitle("zoom out").click();
await page.getByTestId("zoom_out").click();
await page.getByTestId("zoom_out").click();
await page.getByTestId("div-generic-node").click();
await page.getByTestId("code-button-modal").click();

View file

@ -41,9 +41,9 @@ test("should be able to select all with ctrl + A on advanced modal", async ({
.getByTestId("embeddingsOllama Embeddings")
.dragTo(page.locator('//*[@id="react-flow-id"]'));
await page.getByTitle("fit view").click();
await page.getByTitle("zoom out").click();
await page.getByTitle("zoom out").click();
await page.getByTestId("fit_view").click();
await page.getByTestId("zoom_out").click();
await page.getByTestId("zoom_out").click();
const getUA = await page.evaluate(() => navigator.userAgent);
const userAgentInfo = uaParser(getUA);

View file

@ -40,8 +40,8 @@ test("should interact with api request", async ({ page }) => {
.dragTo(page.locator('//*[@id="react-flow-id"]'));
await page.mouse.up();
await page.mouse.down();
await page.getByTitle("fit view").click();
await page.getByTitle("zoom out").click();
await page.getByTitle("zoom out").click();
await page.getByTitle("zoom out").click();
await page.getByTestId("fit_view").click();
await page.getByTestId("zoom_out").click();
await page.getByTestId("zoom_out").click();
await page.getByTestId("zoom_out").click();
});