mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2026-11-06 19:01:54 +00:00
Twenty-five specs called the Playwright APIs with default or hardcoded timeouts. Routed over Tor those budgets are too small, so a spec fails on transport latency rather than on the behaviour it asserts. Route the waits through resolveTimeout and reach pages via gotoOnion, the helpers the tor branch introduced for exactly this. The remaining changes in the diff are import wrapping around those calls. The repository lint enforces this: a raw numeric timeout in a role spec is rejected with a pointer to resolveTimeout, which is how a hardcoded 500ms wait added during this session was caught. Merge work rather than authored here; not deployed. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
24 lines
898 B
JavaScript
24 lines
898 B
JavaScript
const { test, expect } = require("@playwright/test");
|
|
const { resolveTimeout } = require("./timeouts");
|
|
const { skipUnlessServiceEnabled } = require("./service-gating");
|
|
const { normalizeBaseUrl } = require("./personas");
|
|
|
|
const baseUrl = normalizeBaseUrl(process.env.FLOWISE_BASE_URL || "");
|
|
|
|
test.use({ ignoreHTTPSErrors: true });
|
|
|
|
test("mcp: the instance exposes no MCP registry and refuses an unauthenticated caller", async ({ request }) => {
|
|
skipUnlessServiceEnabled("mcp");
|
|
expect(baseUrl, "FLOWISE_BASE_URL must be set").toBeTruthy();
|
|
|
|
const anonymous = await request.get(`${baseUrl.replace(/\/+$/, "")}/api/v1/chatflows`, {
|
|
failOnStatusCode: false,
|
|
maxRedirects: 0,
|
|
timeout: resolveTimeout(30_000),
|
|
});
|
|
expect(
|
|
anonymous.status(),
|
|
"an unauthenticated Flowise API call must be refused or redirected to SSO, never answered",
|
|
).toBeGreaterThanOrEqual(300);
|
|
});
|