Fix portal assets and QA action authentication
Test, build, and deploy ComfyUI Jobs / test-build (push) Failing after 25s
Test, build, and deploy ComfyUI Jobs / deploy (push) Skipped
Test, build, and deploy ComfyUI Jobs / browser-test (push) Skipped
Test, build, and deploy ComfyUI Jobs / qa-gate (push) Successful in 4s
Test, build, and deploy ComfyUI Jobs / test-build (push) Failing after 25s
Test, build, and deploy ComfyUI Jobs / deploy (push) Skipped
Test, build, and deploy ComfyUI Jobs / browser-test (push) Skipped
Test, build, and deploy ComfyUI Jobs / qa-gate (push) Successful in 4s
This commit is contained in:
+16
-1
@@ -1,6 +1,21 @@
|
||||
const test = require('node:test');
|
||||
const assert = require('node:assert/strict');
|
||||
const { jobFromHistory, statusFromHistory } = require('./server');
|
||||
const fs = require('node:fs');
|
||||
const path = require('node:path');
|
||||
const { app, jobFromHistory, statusFromHistory } = require('./server');
|
||||
|
||||
test('serves frontend assets before authentication redirects', async (t) => {
|
||||
const server = app.listen(0);
|
||||
t.after(() => server.close());
|
||||
await new Promise((resolve) => server.once('listening', resolve));
|
||||
const port = server.address().port;
|
||||
const index = fs.readFileSync(path.join(__dirname, 'frontend', 'dist', 'browser', 'index.html'), 'utf8');
|
||||
const asset = index.match(/src="([^"]+\.js)"/)?.[1];
|
||||
assert.ok(asset, 'the built frontend should reference a JavaScript asset');
|
||||
const response = await fetch(`http://127.0.0.1:${port}/${asset}`);
|
||||
assert.equal(response.status, 200);
|
||||
assert.match(response.headers.get('content-type') || '', /javascript/);
|
||||
});
|
||||
|
||||
test('maps completed ComfyUI history into a read-only job summary', () => {
|
||||
const job = jobFromHistory('abc123', { prompt: [1, 'abc123', { '7': { class_type: 'CheckpointLoaderSimple', inputs: { ckpt_name: 'portrait.safetensors' } } }, { title: 'Portrait' }], status: { completed: true, messages: [['execution_start', { timestamp: 1000 }], ['execution_success', { timestamp: 3250 }]] }, outputs: { '7': { images: [{ filename: 'result.png', subfolder: '', type: 'output' }] } } });
|
||||
|
||||
Reference in New Issue
Block a user