diff --git a/.github/workflows/test-ui.yaml b/.github/workflows/test-ui.yaml index dc70fee5e..c29fb48ba 100644 --- a/.github/workflows/test-ui.yaml +++ b/.github/workflows/test-ui.yaml @@ -27,6 +27,11 @@ jobs: with: repository: "Comfy-Org/ComfyUI_frontend" path: "ComfyUI_frontend" + - name: Checkout ComfyUI_devtools + uses: actions/checkout@v4 + with: + repository: "Comfy-Org/ComfyUI_devtools" + path: "ComfyUI/custom_nodes/ComfyUI_devtools" - name: Get commit message id: commit-message run: echo "::set-output name=message::$(git log -1 --pretty=%B)" diff --git a/browser_tests/ComfyPage.ts b/browser_tests/ComfyPage.ts index 5317c37a0..21b3fdd29 100644 --- a/browser_tests/ComfyPage.ts +++ b/browser_tests/ComfyPage.ts @@ -124,6 +124,7 @@ export class ComfyPage { // Buttons public readonly resetViewButton: Locator + public readonly queueButton: Locator // Inputs public readonly workflowUploadInput: Locator @@ -137,6 +138,7 @@ export class ComfyPage { this.canvas = page.locator('#graph-canvas') this.widgetTextBox = page.getByPlaceholder('text').nth(1) this.resetViewButton = page.getByRole('button', { name: 'Reset View' }) + this.queueButton = page.getByRole('button', { name: 'Queue Prompt' }) this.workflowUploadInput = page.locator('#comfy-file-input') this.searchBox = new ComfyNodeSearchBox(page) this.menu = new ComfyMenu(page) diff --git a/browser_tests/assets/execution_error.json b/browser_tests/assets/execution_error.json new file mode 100644 index 000000000..76139d2b8 --- /dev/null +++ b/browser_tests/assets/execution_error.json @@ -0,0 +1,82 @@ +{ + "last_node_id": 17, + "last_link_id": 15, + "nodes": [ + { + "id": 14, + "type": "PreviewImage", + "pos": [ + 858, + -41 + ], + "size": { + "0": 213.8594970703125, + "1": 50.65289306640625 + }, + "flags": {}, + "order": 1, + "mode": 0, + "inputs": [ + { + "name": "images", + "type": "IMAGE", + "link": 15 + } + ], + "properties": { + "Node name for S&R": "PreviewImage" + } + }, + { + "id": 17, + "type": "DevToolsErrorRaiseNode", + "pos": [ + 477, + -40 + ], + "size": { + "0": 210, + "1": 26 + }, + "flags": {}, + "order": 0, + "mode": 0, + "outputs": [ + { + "name": "IMAGE", + "type": "IMAGE", + "links": [ + 15 + ], + "slot_index": 0, + "shape": 3 + } + ], + "properties": { + "Node name for S&R": "DevToolsErrorRaiseNode" + } + } + ], + "links": [ + [ + 15, + 17, + 0, + 14, + 0, + "IMAGE" + ] + ], + "groups": [], + "config": {}, + "extra": { + "ds": { + "scale": 1.2100000000000006, + "offset": [ + -266.1038310281165, + 337.94335447664554 + ] + } + }, + "version": 0.4 +} \ No newline at end of file diff --git a/browser_tests/loadWorkflowWarning.spec.ts b/browser_tests/dialog.spec.ts similarity index 53% rename from browser_tests/loadWorkflowWarning.spec.ts rename to browser_tests/dialog.spec.ts index 6c9131c6f..2d5ebf492 100644 --- a/browser_tests/loadWorkflowWarning.spec.ts +++ b/browser_tests/dialog.spec.ts @@ -12,3 +12,16 @@ test.describe('Load workflow warning', () => { await expect(missingNodesWarning).toBeVisible() }) }) + +test.describe('Execution error', () => { + test('Should display an error message when an execution error occurs', async ({ + comfyPage + }) => { + await comfyPage.loadWorkflow('execution_error') + await comfyPage.queueButton.click() + + // Wait for the element with the .comfy-execution-error selector to be visible + const executionError = comfyPage.page.locator('.comfy-error-report') + await expect(executionError).toBeVisible() + }) +}) diff --git a/package-lock.json b/package-lock.json index 0c8288a50..2f2102010 100644 --- a/package-lock.json +++ b/package-lock.json @@ -13,6 +13,7 @@ "@primevue/themes": "^4.0.0-rc.2", "@vitejs/plugin-vue": "^5.0.5", "@vueuse/core": "^11.0.0", + "axios": "^1.7.4", "class-transformer": "^0.5.1", "dotenv": "^16.4.5", "fuse.js": "^7.0.0", @@ -4485,8 +4486,7 @@ "node_modules/asynckit": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", - "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==", - "dev": true + "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==" }, "node_modules/autoprefixer": { "version": "10.4.19", @@ -4525,6 +4525,17 @@ "postcss": "^8.1.0" } }, + "node_modules/axios": { + "version": "1.7.4", + "resolved": "https://registry.npmjs.org/axios/-/axios-1.7.4.tgz", + "integrity": "sha512-DukmaFRnY6AzAALSH4J2M3k6PkaC+MfaAGdEERRWcC9q3/TWQwLpHR8ZRLKTdQ3aBDL64EdluRDjJqKw+BPZEw==", + "license": "MIT", + "dependencies": { + "follow-redirects": "^1.15.6", + "form-data": "^4.0.0", + "proxy-from-env": "^1.1.0" + } + }, "node_modules/babel-jest": { "version": "29.7.0", "resolved": "https://registry.npmjs.org/babel-jest/-/babel-jest-29.7.0.tgz", @@ -5155,7 +5166,6 @@ "version": "1.0.8", "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", - "dev": true, "dependencies": { "delayed-stream": "~1.0.0" }, @@ -5451,7 +5461,6 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==", - "dev": true, "engines": { "node": ">=0.4.0" } @@ -6271,6 +6280,26 @@ "dev": true, "license": "ISC" }, + "node_modules/follow-redirects": { + "version": "1.15.6", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.6.tgz", + "integrity": "sha512-wWN62YITEaOpSK584EZXJafH1AGpO8RVgElfkuXbTOrPX4fIfOyEpW/CsiNd8JdYrAoOvafRTOEnvsO++qCqFA==", + "funding": [ + { + "type": "individual", + "url": "https://github.com/sponsors/RubenVerborgh" + } + ], + "license": "MIT", + "engines": { + "node": ">=4.0" + }, + "peerDependenciesMeta": { + "debug": { + "optional": true + } + } + }, "node_modules/foreground-child": { "version": "3.2.1", "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-3.2.1.tgz", @@ -6303,7 +6332,6 @@ "version": "4.0.0", "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz", "integrity": "sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==", - "dev": true, "dependencies": { "asynckit": "^0.4.0", "combined-stream": "^1.0.8", @@ -9285,7 +9313,6 @@ "version": "1.52.0", "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", - "dev": true, "engines": { "node": ">= 0.6" } @@ -9294,7 +9321,6 @@ "version": "2.1.35", "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", - "dev": true, "dependencies": { "mime-db": "1.52.0" }, @@ -10067,6 +10093,12 @@ "dev": true, "license": "ISC" }, + "node_modules/proxy-from-env": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz", + "integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==", + "license": "MIT" + }, "node_modules/psl": { "version": "1.9.0", "resolved": "https://registry.npmjs.org/psl/-/psl-1.9.0.tgz", diff --git a/package.json b/package.json index c477203dd..30ed0ffc2 100644 --- a/package.json +++ b/package.json @@ -60,6 +60,7 @@ "@primevue/themes": "^4.0.0-rc.2", "@vitejs/plugin-vue": "^5.0.5", "@vueuse/core": "^11.0.0", + "axios": "^1.7.4", "class-transformer": "^0.5.1", "dotenv": "^16.4.5", "fuse.js": "^7.0.0", diff --git a/src/components/common/NoResultsPlaceholder.vue b/src/components/common/NoResultsPlaceholder.vue index 1782b9a7f..c06ad8072 100644 --- a/src/components/common/NoResultsPlaceholder.vue +++ b/src/components/common/NoResultsPlaceholder.vue @@ -44,6 +44,7 @@ defineEmits(['action']) .no-results-placeholder :deep(.p-card) { background-color: var(--surface-ground); text-align: center; + box-shadow: unset; } .no-results-placeholder h3 { diff --git a/src/components/dialog/GlobalDialog.vue b/src/components/dialog/GlobalDialog.vue index 26956036d..16459137f 100644 --- a/src/components/dialog/GlobalDialog.vue +++ b/src/components/dialog/GlobalDialog.vue @@ -6,7 +6,7 @@ closable closeOnEscape dismissableMask - :maximizable="dialogStore.props.maximizable ?? false" + :maximizable="maximizable" @hide="dialogStore.closeDialog" @maximize="maximized = true" @unmaximize="maximized = false" @@ -19,20 +19,20 @@
{{ reportContent }}
+