24 lines
1.1 KiB
JavaScript
24 lines
1.1 KiB
JavaScript
import assert from "node:assert/strict";
|
|
import { readFileSync } from "node:fs";
|
|
|
|
const moduleSource = readFileSync("src/module.ts", "utf8");
|
|
const panel = readFileSync("src/features/IdentityTrustPanel.tsx", "utf8");
|
|
const api = readFileSync("src/api/identityTrust.ts", "utf8");
|
|
|
|
assert.match(moduleSource, /"settings.sections": settingsSections/);
|
|
assert.match(moduleSource, /"admin.sections": adminSections/);
|
|
assert.match(moduleSource, /identity_trust\.settings\.devices/);
|
|
assert.match(moduleSource, /identity_trust\.admin\.epochs/);
|
|
assert.match(panel, /<ReferenceSelect/);
|
|
assert.match(panel, /revoking\.epoch/);
|
|
assert.match(panel, /disabled: !canRevokeDevice/);
|
|
assert.match(panel, /identity_trust:device:write/);
|
|
assert.match(panel, /cannot be recalled/);
|
|
assert.match(panel, /listKeyAccessDecisions/);
|
|
assert.match(panel, /rotateEpoch/);
|
|
assert.doesNotMatch(panel, /public_jwk/);
|
|
assert.match(api, /expected_epoch: expectedEpoch/);
|
|
assert.match(api, /identity-trust\/account-options/);
|
|
|
|
console.log("Identity Trust user and administration UI structural contract passed.");
|