Add Users settings tab
This commit is contained in:
@@ -9,6 +9,7 @@ import { readFile } from "node:fs/promises";
|
||||
const indexPath = new URL("../../assets/web/index.html", import.meta.url);
|
||||
const pluginLoaderPath = new URL("../src/plugin-loader.ts", import.meta.url);
|
||||
const mapCorePath = new URL("../src/map-core.ts", import.meta.url);
|
||||
const appPath = new URL("../src/app.ts", import.meta.url);
|
||||
|
||||
test("index loads one first-party application bootstrap", async () => {
|
||||
const html = await readFile(indexPath, "utf8");
|
||||
@@ -30,6 +31,17 @@ test("startup has no remote script or stylesheet dependencies", async () => {
|
||||
);
|
||||
});
|
||||
|
||||
test("administrator user management is a dedicated Settings sub-tab", async () => {
|
||||
const [html, app] = await Promise.all([
|
||||
readFile(indexPath, "utf8"),
|
||||
readFile(appPath, "utf8"),
|
||||
]);
|
||||
assert.match(html, /data-subtab="settings-users"/);
|
||||
assert.match(html, /id="subtab-settings-users" class="sub-tab-panel"/);
|
||||
assert.match(app, /authEnabled && authRole === "admin"/);
|
||||
assert.match(app, /settings-users-tab/);
|
||||
});
|
||||
|
||||
test("lazy frontend features use modules and local map symbols", async () => {
|
||||
const [loader, map] = await Promise.all([
|
||||
readFile(pluginLoaderPath, "utf8"),
|
||||
|
||||
Reference in New Issue
Block a user