fix: add minimized attribute to components and make chatinput and chatoutput start minimized by default (#5374)
* Added Minimized field to backend to make component start as minimized * Added minimized as true to chat components * Added showNode default value as the opposite of minimized * Changed starter projects to new components * [autofix.ci] apply automated fixes * [autofix.ci] apply automated fixes (attempt 2/3) * Fixed Freeze and DecisionFlow tests * Fixed other tests that involved chatoutput and chatinput * Restored tests that didnt fail * Fixed stop playground test --------- Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
This commit is contained in:
parent
b4673d3656
commit
bd7f913d28
32 changed files with 90 additions and 47 deletions
|
|
@ -56,6 +56,7 @@ export function useAddComponent() {
|
|||
position: { x: 0, y: 0 },
|
||||
data: {
|
||||
node: component,
|
||||
showNode: !component.minimized,
|
||||
type: type,
|
||||
id: newId,
|
||||
},
|
||||
|
|
|
|||
|
|
@ -83,6 +83,12 @@ test(
|
|||
targetPosition: { x: 600, y: 200 },
|
||||
});
|
||||
|
||||
await page.getByTestId("div-generic-node").nth(4).click();
|
||||
|
||||
await page.getByTestId("more-options-modal").click();
|
||||
|
||||
await page.getByTestId("expand-button-modal").click();
|
||||
|
||||
await page.getByTestId("fit_view").click();
|
||||
|
||||
let outdatedComponents = await page
|
||||
|
|
|
|||
|
|
@ -75,7 +75,7 @@ test(
|
|||
await page.getByTestId("zoom_out").click();
|
||||
|
||||
const elementsChatInput = await page
|
||||
.locator('[data-testid="handle-chatinput-shownode-message-right"]')
|
||||
.locator('[data-testid="handle-chatinput-noshownode-message-source"]')
|
||||
.all();
|
||||
|
||||
let visibleElementHandle;
|
||||
|
|
@ -133,7 +133,7 @@ test(
|
|||
|
||||
//
|
||||
const elementsChatOutput = await page
|
||||
.getByTestId("handle-chatoutput-shownode-text-left")
|
||||
.getByTestId("handle-chatoutput-noshownode-text-target")
|
||||
.all();
|
||||
|
||||
for (const element of elementsChatOutput) {
|
||||
|
|
|
|||
|
|
@ -118,7 +118,7 @@ test(
|
|||
await parseDataOutput.hover();
|
||||
await page.mouse.down();
|
||||
const chatOutputInput = await page.getByTestId(
|
||||
"handle-chatoutput-shownode-text-left",
|
||||
"handle-chatoutput-noshownode-text-target",
|
||||
);
|
||||
await chatOutputInput.hover();
|
||||
await page.mouse.up();
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import { Page, test } from "@playwright/test";
|
||||
import { test } from "@playwright/test";
|
||||
import * as dotenv from "dotenv";
|
||||
import path from "path";
|
||||
import { awaitBootstrapTest } from "../../utils/await-bootstrap-test";
|
||||
|
|
@ -247,7 +247,7 @@ test(
|
|||
.nth(1)
|
||||
.click();
|
||||
await page
|
||||
.getByTestId("handle-chatinput-shownode-message-right")
|
||||
.getByTestId("handle-chatinput-noshownode-message-source")
|
||||
.nth(0)
|
||||
.click();
|
||||
await page
|
||||
|
|
@ -333,7 +333,7 @@ test(
|
|||
.nth(2)
|
||||
.click();
|
||||
await page
|
||||
.getByTestId("handle-chatoutput-shownode-text-left")
|
||||
.getByTestId("handle-chatoutput-noshownode-text-target")
|
||||
.nth(0)
|
||||
.click();
|
||||
await page
|
||||
|
|
@ -341,7 +341,7 @@ test(
|
|||
.nth(0)
|
||||
.click();
|
||||
await page
|
||||
.getByTestId("handle-chatoutput-shownode-text-left")
|
||||
.getByTestId("handle-chatoutput-noshownode-text-target")
|
||||
.nth(1)
|
||||
.click();
|
||||
const apiKeyInput = page.getByTestId("popover-anchor-input-api_key");
|
||||
|
|
|
|||
|
|
@ -50,7 +50,7 @@ test("chat_io_teste", { tag: ["@release", "@workspace"] }, async ({ page }) => {
|
|||
await page.getByTestId("zoom_out").click();
|
||||
|
||||
const elementsChatInput = await page
|
||||
.locator('[data-testid="handle-chatinput-shownode-message-right"]')
|
||||
.locator('[data-testid="handle-chatinput-noshownode-message-source"]')
|
||||
.all();
|
||||
|
||||
let visibleElementHandle;
|
||||
|
|
@ -69,7 +69,7 @@ test("chat_io_teste", { tag: ["@release", "@workspace"] }, async ({ page }) => {
|
|||
// Move to the second element
|
||||
|
||||
const elementsChatOutput = await page
|
||||
.getByTestId("handle-chatoutput-shownode-text-left")
|
||||
.getByTestId("handle-chatoutput-noshownode-text-target")
|
||||
.all();
|
||||
|
||||
for (const element of elementsChatOutput) {
|
||||
|
|
|
|||
|
|
@ -114,7 +114,7 @@ test(
|
|||
|
||||
// Move to the second element
|
||||
const chatOutputElement = await page
|
||||
.getByTestId("handle-chatoutput-shownode-text-left")
|
||||
.getByTestId("handle-chatoutput-noshownode-text-target")
|
||||
.all();
|
||||
|
||||
for (const element of chatOutputElement) {
|
||||
|
|
|
|||
|
|
@ -17,6 +17,10 @@ test(
|
|||
},
|
||||
);
|
||||
|
||||
await page.waitForSelector('[data-testid="zoom_out"]', {
|
||||
timeout: 3000,
|
||||
});
|
||||
|
||||
await page.getByTestId("sidebar-custom-component-button").click();
|
||||
await page.getByTitle("fit view").click();
|
||||
await page.getByTitle("zoom out").click();
|
||||
|
|
@ -36,6 +40,12 @@ test(
|
|||
|
||||
await adjustScreenView(page);
|
||||
|
||||
await page.getByTestId("div-generic-node").nth(1).click();
|
||||
|
||||
await page.getByTestId("more-options-modal").click();
|
||||
|
||||
await page.getByTestId("expand-button-modal").click();
|
||||
|
||||
await page.getByTestId("div-generic-node").nth(0).click();
|
||||
|
||||
await page.getByTestId("code-button-modal").nth(0).click();
|
||||
|
|
|
|||
|
|
@ -77,7 +77,7 @@ test(
|
|||
await page.getByTestId("fit_view").click();
|
||||
|
||||
const elementsChatInput = await page
|
||||
.locator('[data-testid="handle-chatinput-shownode-message-right"]')
|
||||
.locator('[data-testid="handle-chatinput-noshownode-message-source"]')
|
||||
.all();
|
||||
|
||||
let visibleElementHandle;
|
||||
|
|
@ -125,7 +125,7 @@ test(
|
|||
|
||||
// Move to the second element
|
||||
const elementsChatOutput = await page
|
||||
.getByTestId("handle-chatoutput-shownode-text-left")
|
||||
.getByTestId("handle-chatoutput-noshownode-text-target")
|
||||
.all();
|
||||
|
||||
for (const element of elementsChatOutput) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue