refactor: prevent tool mode on group component (#5522)
* Refactor nodeToolbarComponent to conditionally show tool mode button based on isGroup variable * add toolModeGroup.spec.ts test * [autofix.ci] apply automated fixes --------- Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
This commit is contained in:
parent
2ed0b10679
commit
a57a49d48d
3 changed files with 37 additions and 7 deletions
31
src/frontend/tests/core/features/toolModeGroup.spec.ts
Normal file
31
src/frontend/tests/core/features/toolModeGroup.spec.ts
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
import { expect, test } from "@playwright/test";
|
||||
import { awaitBootstrapTest } from "../../utils/await-bootstrap-test";
|
||||
|
||||
test.describe("group node test", () => {
|
||||
/// <reference lib="dom"/>
|
||||
test(
|
||||
"group and ungroup updating values",
|
||||
{ tag: ["@release", "@workspace"] },
|
||||
async ({ page }) => {
|
||||
await awaitBootstrapTest(page);
|
||||
|
||||
await page.getByTestId("side_nav_options_all-templates").click();
|
||||
await page
|
||||
.getByRole("heading", { name: "Basic Prompting" })
|
||||
.first()
|
||||
.click();
|
||||
await page.getByTestId("fit_view").first().click();
|
||||
|
||||
await page
|
||||
.getByTestId("title-OpenAI")
|
||||
.click({ modifiers: ["ControlOrMeta"] });
|
||||
await page
|
||||
.getByTestId("title-Prompt")
|
||||
.click({ modifiers: ["ControlOrMeta"] });
|
||||
|
||||
await page.getByRole("button", { name: "Group" }).click();
|
||||
await page.getByTestId("title-Group").click();
|
||||
await expect(page.getByTestId("tool-mode-button")).toBeHidden();
|
||||
},
|
||||
);
|
||||
});
|
||||
Loading…
Add table
Add a link
Reference in a new issue