mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-01-26 19:09:52 +00:00
Relands "Fix node searchbox default value setting" (#152)
* Revert "Revert "Fix node searchbox default value setting (#150)" (#151)"
This reverts commit bb02f935ff.
* Update test expectations [skip ci]
---------
Co-authored-by: github-actions <github-actions@github.com>
This commit is contained in:
Binary file not shown.
|
Before Width: | Height: | Size: 100 KiB After Width: | Height: | Size: 101 KiB |
@@ -1,17 +1,6 @@
|
||||
import { expect } from "@playwright/test";
|
||||
import { ComfyPage, comfyPageFixture } from "./ComfyPage";
|
||||
import { comfyPageFixture as test} from "./ComfyPage";
|
||||
|
||||
export const test = comfyPageFixture.extend<{ comfyPage: ComfyPage }>({
|
||||
comfyPage: async ({ comfyPage }, use) => {
|
||||
await comfyPage.page.evaluate(async () => {
|
||||
await window["app"].ui.settings.setSettingValueAsync(
|
||||
"Comfy.NodeSearchBoxImpl",
|
||||
"default"
|
||||
);
|
||||
});
|
||||
await use(comfyPage);
|
||||
},
|
||||
});
|
||||
|
||||
test.describe("Node search box", () => {
|
||||
test("Can trigger on empty canvas double click", async ({ comfyPage }) => {
|
||||
|
||||
@@ -429,9 +429,9 @@ export class ComfyUI {
|
||||
options: ["default", "litegraph (legacy)"],
|
||||
defaultValue: "default",
|
||||
onChange: (value?: string) => {
|
||||
if (value === undefined) return;
|
||||
if (!app.canvas) return;
|
||||
|
||||
value = value || "default";
|
||||
const useLitegraphSearch = value === "litegraph (legacy)";
|
||||
app.canvas.allow_searchbox = useLitegraphSearch;
|
||||
document.dispatchEvent(
|
||||
|
||||
Reference in New Issue
Block a user