推进 INI 面板 entry doc
This commit is contained in:
24
wasm-port/tests/ui/node/verify_ini_panel_entry_docs.mjs
Normal file
24
wasm-port/tests/ui/node/verify_ini_panel_entry_docs.mjs
Normal file
@@ -0,0 +1,24 @@
|
||||
import assert from "node:assert/strict";
|
||||
import { readFileSync } from "node:fs";
|
||||
import { fileURLToPath } from "node:url";
|
||||
import { dirname, resolve } from "node:path";
|
||||
|
||||
import {
|
||||
getIniPanelEntryManifest,
|
||||
} from "../../../runtime/ui/ini-panel/ui-shell.js";
|
||||
|
||||
const __dirname = dirname(fileURLToPath(import.meta.url));
|
||||
const root = resolve(__dirname, "../../..");
|
||||
const docText = readFileSync(resolve(root, "docs/panel-entry.md"), "utf8");
|
||||
|
||||
assert.match(docText, /runtime\/ui\/ini-panel\/ui-shell\.js/);
|
||||
assert.match(docText, /createMachineSessionControlPageController/);
|
||||
assert.match(docText, /renderMachineSessionControlView/);
|
||||
assert.match(docText, /runtime\/ui\/ini-panel\/launch\.html/);
|
||||
assert.match(docText, /runtime\/ui\/ini-panel\/control-page\.html/);
|
||||
|
||||
for (const entry of getIniPanelEntryManifest()) {
|
||||
assert.match(docText, new RegExp(`\\| \`${entry.id}\` \\| \`${entry.href.replace(".", "\\.")}\` \\| ${entry.title} \\|`));
|
||||
}
|
||||
|
||||
console.log("ini_panel_entry_docs_node_smoke=ok");
|
||||
6
wasm-port/tests/ui/node/verify_ini_panel_entry_docs.sh
Executable file
6
wasm-port/tests/ui/node/verify_ini_panel_entry_docs.sh
Executable file
@@ -0,0 +1,6 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
ROOT_DIR="$(cd "$(dirname "$0")/../../.." && pwd)"
|
||||
|
||||
node "$ROOT_DIR/tests/ui/node/verify_ini_panel_entry_docs.mjs"
|
||||
@@ -12,5 +12,6 @@ ROOT_DIR="$(cd "$(dirname "$0")/../../.." && pwd)"
|
||||
"$ROOT_DIR/tests/ui/node/verify_ini_panel_control_page_controller.sh"
|
||||
"$ROOT_DIR/tests/ui/node/verify_ini_panel_entry_manifest.sh"
|
||||
"$ROOT_DIR/tests/ui/node/verify_ini_panel_ui_shell.sh"
|
||||
"$ROOT_DIR/tests/ui/node/verify_ini_panel_entry_docs.sh"
|
||||
|
||||
echo "ui_node_smokes=ok"
|
||||
|
||||
Reference in New Issue
Block a user