Unit tests + widget input fixes (#1760) · code/app-python-comfyui@5818ca8 · GitHub
Skip to content

Commit 5818ca8

Browse files
Unit tests + widget input fixes (Comfy-Org#1760)
* setup ui unit tests * Refactoring, adding connections * Few tweaks * Fix type * Add general test * Refactored and extended test * move to describe * for groups * Add test for converted widgets on missing nodes + fix crash * tidy * mores tests + refactor * throw earlier to get less confusing error * support outputs * more test * add ci action * use lts node * Fix? * Prevent connecting non matching combos * update * accidently removed npm i * Disable logging extension * added step to generate object_info * fix python * install python * install deps * fix cwd? * logging * Fix double resolve * create dir * update pkg
1 parent 4185324 commit 5818ca8

16 files changed

Lines changed: 6680 additions & 18 deletions

File tree

‎.github/workflows/test-ui.yaml‎

Lines changed: 25 additions & 0 deletions

‎.gitignore‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,4 @@ venv/
1414
/web/extensions/*
1515
!/web/extensions/logging.js.example
1616
!/web/extensions/core/
17+
/tests-ui/data/object_info.json

‎tests-ui/.gitignore‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
node_modules

‎tests-ui/babel.config.json‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"presets": ["@babel/preset-env"]
3+
}

‎tests-ui/globalSetup.js‎

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
module.exports = async function () {
2+
global.ResizeObserver = class ResizeObserver {
3+
observe() {}
4+
unobserve() {}
5+
disconnect() {}
6+
};
7+
8+
const { nop } = require("./utils/nopProxy");
9+
global.enableWebGLCanvas = nop;
10+
11+
HTMLCanvasElement.prototype.getContext = nop;
12+
13+
localStorage["Comfy.Settings.Comfy.Logging.Enabled"] = "false";
14+
};

‎tests-ui/jest.config.js‎

Lines changed: 9 additions & 0 deletions

0 commit comments

Comments
 (0)