推进 INI 面板 entry manifest
This commit is contained in:
@@ -7,6 +7,11 @@
|
||||
<body>
|
||||
<pre id="status">running</pre>
|
||||
<script type="module">
|
||||
import {
|
||||
getIniPanelEntryByHref,
|
||||
getIniPanelEntryManifest,
|
||||
} from "../../runtime/ui/ini-panel/entry-manifest.js";
|
||||
|
||||
function assertEqual(actual, expected, label) {
|
||||
if (actual !== expected) {
|
||||
throw new Error(`${label}: expected ${expected}, got ${actual}`);
|
||||
@@ -25,6 +30,15 @@
|
||||
}
|
||||
|
||||
try {
|
||||
const manifest = getIniPanelEntryManifest();
|
||||
assertEqual(manifest.length, 2, "launch manifest length");
|
||||
assertEqual(getIniPanelEntryByHref("./index.html").id, "edit-run", "launch manifest edit entry");
|
||||
assertEqual(
|
||||
getIniPanelEntryByHref("./control-page.html").title,
|
||||
"Open read-only control view",
|
||||
"launch manifest control entry",
|
||||
);
|
||||
|
||||
const launchDoc = await loadLaunchFrame();
|
||||
assertEqual(
|
||||
launchDoc.querySelector('a[href="./index.html"]').textContent,
|
||||
|
||||
Reference in New Issue
Block a user