v0.7.1 Surface Runner Framework
All checks were successful
CI/CD / detect-changes (pull_request) Successful in 23s
CI/CD / test-frontend (pull_request) Successful in 26s
CI/CD / test-go-pg (pull_request) Successful in 2m35s
CI/CD / test-sqlite (pull_request) Successful in 3m19s
CI/CD / build-and-deploy (pull_request) Successful in 1m46s
All checks were successful
CI/CD / detect-changes (pull_request) Successful in 23s
CI/CD / test-frontend (pull_request) Successful in 26s
CI/CD / test-go-pg (pull_request) Successful in 2m35s
CI/CD / test-sqlite (pull_request) Successful in 3m19s
CI/CD / build-and-deploy (pull_request) Successful in 1m46s
sw.testing SDK module — structured test framework for surface runners: - suite/test registration, lifecycle hooks (beforeAll/afterAll/beforeEach/afterEach) - Assertion library (ok/eq/neq/gt/match/throws/status/shape/arrayOf) - Auto-cleanup via track(type, id) with LIFO deletion - Three result statuses: passed/failed/warned - Structured JSON results with timing, warnings, cleanup stats test-runner manifest type: - ValidateManifest accepts "test-runner" packages - Excluded from sidebar nav (extensionNavItems filters surface/full only) - DB migrations: SQLite 013, Postgres 014 (CHECK constraint) ICD runner migration (kernel-only): - Migrated from T.test()/T.assert() to sw.testing.suite() - Stripped extension-dependent tests (channels, notes, personas, etc.) - Kernel suites: smoke, crud, authz, security, providers, packaging, sdk - Deleted ui.js + css (rendering delegated to registry surface) SDK runner migration (kernel-only): - Migrated from T.dualTest()/T.domains to sw.testing.suite() - Stripped extension domains (belong in v0.7.2 package runners) - Kernel suites: misc, workflows, admin, packages, connections, deps, composition Runner registry surface (/s/test-runners): - Admin-only dashboard discovering test-runner packages - Run All / per-runner Run buttons, real-time results - Export Failures / Export Full Results (JSON download) - Dark mode styling using kernel CSS variables - Suite count polling for async runner script loading 141 passed, 0 failed on fresh minimal install. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -9,10 +9,10 @@
|
||||
var T = window.SDKR;
|
||||
if (!T) return;
|
||||
|
||||
T.registerDomain('connections', async function () {
|
||||
sw.testing.suite('sdk/connections', async function (s) {
|
||||
|
||||
if (!window.sw || !sw.isAdmin) {
|
||||
await T.test('connections', 'guard', 'skip — not admin', async function () {
|
||||
s.test('guard: skip — not admin', async function (t) {
|
||||
T.assert(true, 'skipped (user is not admin)');
|
||||
});
|
||||
return;
|
||||
@@ -23,7 +23,7 @@
|
||||
|
||||
// ── Global CRUD ──────────────────────────
|
||||
|
||||
await T.test('connections', 'admin-create', 'create global connection', async function () {
|
||||
s.test('admin-create: create global connection', async function (t) {
|
||||
var r = await sw.api.admin.connections.create({
|
||||
type: 'sdk-test-conn',
|
||||
package_id: 'sdk-test-pkg',
|
||||
@@ -39,7 +39,7 @@
|
||||
if (globalId) try { await sw.api.admin.connections.del(globalId); } catch (_) {}
|
||||
});
|
||||
|
||||
await T.test('connections', 'admin-list', 'list global connections includes created', async function () {
|
||||
s.test('admin-list: list global connections includes created', async function (t) {
|
||||
var r = await sw.api.admin.connections.list();
|
||||
T.assert(Array.isArray(r), 'should be array');
|
||||
var found = r.find(function (c) { return c.id === globalId; });
|
||||
@@ -48,7 +48,7 @@
|
||||
T.assert(found.name === 'Global Test', 'name matches');
|
||||
});
|
||||
|
||||
await T.test('connections', 'admin-update', 'update global connection', async function () {
|
||||
s.test('admin-update: update global connection', async function (t) {
|
||||
await sw.api.admin.connections.update(globalId, { name: 'Global Test Updated' });
|
||||
var list = await sw.api.admin.connections.list();
|
||||
var found = list.find(function (c) { return c.id === globalId; });
|
||||
@@ -57,7 +57,7 @@
|
||||
|
||||
// ── Personal CRUD ────────────────────────
|
||||
|
||||
await T.test('connections', 'personal-create', 'create personal connection', async function () {
|
||||
s.test('personal-create: create personal connection', async function (t) {
|
||||
var r = await sw.api.connections.create({
|
||||
type: 'sdk-test-conn',
|
||||
package_id: 'sdk-test-pkg',
|
||||
@@ -72,7 +72,7 @@
|
||||
if (personalId) try { await sw.api.connections.del(personalId); } catch (_) {}
|
||||
});
|
||||
|
||||
await T.test('connections', 'personal-list', 'list personal connections', async function () {
|
||||
s.test('personal-list: list personal connections', async function (t) {
|
||||
var r = await sw.api.connections.list();
|
||||
T.assert(Array.isArray(r), 'should be array');
|
||||
var found = r.find(function (c) { return c.id === personalId; });
|
||||
@@ -81,7 +81,7 @@
|
||||
|
||||
// ── Scope Resolution ─────────────────────
|
||||
|
||||
await T.test('connections', 'resolve-prefers-personal', 'resolve prefers personal over global', async function () {
|
||||
s.test('resolve-prefers-personal: resolve prefers personal over global', async function (t) {
|
||||
var r = await sw.api.connections.resolve('sdk-test-conn');
|
||||
T.assert(r && r.id, 'should resolve');
|
||||
// Personal scope should win over global
|
||||
@@ -89,7 +89,7 @@
|
||||
T.assert(r.id === personalId, 'should be the personal connection');
|
||||
});
|
||||
|
||||
await T.test('connections', 'resolve-by-name', 'resolve by name returns specific connection', async function () {
|
||||
s.test('resolve-by-name: resolve by name returns specific connection', async function (t) {
|
||||
var r = await sw.api.connections.resolve('sdk-test-conn', 'Global Test Updated');
|
||||
T.assert(r && r.id, 'should resolve');
|
||||
T.assert(r.id === globalId, 'should match global connection by name');
|
||||
@@ -97,12 +97,12 @@
|
||||
|
||||
// ── Connection Type Discovery (v0.38.4) ──
|
||||
|
||||
await T.test('connections', 'types-list', 'GET /connection-types returns array', async function () {
|
||||
s.test('types-list: GET /connection-types returns array', async function (t) {
|
||||
var r = await sw.api.connectionTypes.list();
|
||||
T.assert(Array.isArray(r), 'should be array');
|
||||
});
|
||||
|
||||
await T.test('connections', 'types-include-sdk-test', 'connection types include sdk-test-conn from global conn', async function () {
|
||||
s.test('types-include-sdk-test: connection types include sdk-test-conn from global conn', async function (t) {
|
||||
// The global connection we created above references package_id sdk-test-pkg
|
||||
// but that package may not exist. The endpoint scans active package manifests,
|
||||
// so this test verifies the endpoint returns without error. Actual type matching
|
||||
@@ -113,7 +113,7 @@
|
||||
|
||||
// ── Cleanup ──────────────────────────────
|
||||
|
||||
await T.test('connections', 'personal-delete', 'delete personal connection', async function () {
|
||||
s.test('personal-delete: delete personal connection', async function (t) {
|
||||
await sw.api.connections.del(personalId);
|
||||
var list = await sw.api.connections.list();
|
||||
var found = list.find(function (c) { return c.id === personalId; });
|
||||
@@ -121,7 +121,7 @@
|
||||
personalId = null;
|
||||
});
|
||||
|
||||
await T.test('connections', 'admin-delete', 'delete global connection', async function () {
|
||||
s.test('admin-delete: delete global connection', async function (t) {
|
||||
await sw.api.admin.connections.del(globalId);
|
||||
var list = await sw.api.admin.connections.list();
|
||||
var found = list.find(function (c) { return c.id === globalId; });
|
||||
|
||||
Reference in New Issue
Block a user