Skip to content

Autonomous development for real products. Governed agents build from specs you approve, follow the rules you set, and nothing merges until another agent proves it. Your decisions, judgement and taste are the bar that work must clear. Declare your vision and let agents build it.

test(view): the fixture allows the view's own link check [N26]

Corey Olson47858cdb70cb
diff --git a/test/cockpit/fixture.test.js b/test/cockpit/fixture.test.js
index 00c62e83..4f275b25 100644
--- a/test/cockpit/fixture.test.js
+++ b/test/cockpit/fixture.test.js
@@ -296,7 +296,10 @@ test('the page uses only API v1 for state, code and every offered move [A3,N26,N
assert.equal(moves[2].body.args.as, 'person');
assert.equal(moves[2].body.item, ask);
assert.equal(moves[4].body.args.off, true);
- assert.ok(page.requests.every((request) => /^\/api\/v1\/boards(?:$|\/[^/]+\/(?:state|code|moves|items\/\d+|items\?q=[^&]+)(?:\?|$))/.test(request.path)), 'every page request uses a public v1 path');
+ // The local view also asks its own server whether it can link boards (/api/v1/view-link, #633).
+ const offPublic = [...new Set(page.requests.map((request) => request.path).filter((path) => path !== '/api/v1/view-link'
+ && !/^\/api\/v1\/boards(?:$|\/[^/]+\/(?:state|code|moves|items\/\d+|items\?q=[^&]+)(?:\?|$))/.test(path)))];
+ assert.deepEqual(offPublic, [], 'every page request uses a public v1 path');
assert.ok(page.requests.some((request) => request.path === '/api/v1/boards'));
assert.ok(page.requests.some((request) => request.path === `/api/v1/boards/${id}/state`));
assert.ok(page.requests.some((request) => request.path.startsWith(`/api/v1/boards/${id}/code?`)));