feat: expand graph canvas and restore original Endoleap branding
This commit is contained in:
+12
-1
@@ -3,6 +3,7 @@ import { createServer } from "node:http";
|
||||
import { spawn } from "node:child_process";
|
||||
import { once } from "node:events";
|
||||
import { fileURLToPath } from "node:url";
|
||||
import { readdir, readFile } from "node:fs/promises";
|
||||
const host = "http://127.0.0.1:3005";
|
||||
const graphs = new Map();
|
||||
let mockProfile = {
|
||||
@@ -95,6 +96,16 @@ try {
|
||||
assert.match(html, /啡跃 Endoleap · 让灵感有形/);
|
||||
assert.match(html, /name="description"/);
|
||||
assert.match(html, /name="viewport"/);
|
||||
assert(html.includes('/brand/icons/favicon.ico'));
|
||||
assert(html.includes('/brand/icons/apple-touch-icon.png'));
|
||||
}
|
||||
const brandRoot = new URL("../public/brand/", import.meta.url);
|
||||
const assets = (await readdir(brandRoot, { recursive: true })).filter((file) => /\.(png|ico|svg)$/.test(file));
|
||||
assert.equal(assets.length, 88);
|
||||
for (const asset of assets) {
|
||||
const response = await fetch(host + "/brand/" + asset);
|
||||
assert.equal(response.status, 200, asset);
|
||||
assert.deepEqual(Buffer.from(await response.arrayBuffer()), await readFile(new URL(asset, brandRoot)), asset);
|
||||
}
|
||||
assert.equal((await fetch(host + "/missing-page")).status, 404);
|
||||
const res = await fetch(host + "/api/foundry/auth/login", {
|
||||
@@ -195,7 +206,7 @@ try {
|
||||
assert.equal(await logout.text(), "");
|
||||
assert.match(logout.headers.get("set-cookie"), /Max-Age=0/);
|
||||
console.log(
|
||||
"PASS: avatar and profile updates, App Router pages and metadata, body validation, method and query filtering, OAuth redirects, logout, session cookie, token removal, authenticated proxy, invalid session, cross-origin rejection, path allowlist, OAuth validation",
|
||||
"PASS: 88 original brand assets, favicon metadata, avatar and profile updates, App Router pages and metadata, body validation, method and query filtering, OAuth redirects, logout, session cookie, token removal, authenticated proxy, invalid session, cross-origin rejection, path allowlist, OAuth validation",
|
||||
);
|
||||
} finally {
|
||||
const exited = once(app, "exit");
|
||||
|
||||
Reference in New Issue
Block a user