chore: checkpoint pi lab rust integration work
This commit is contained in:
@@ -119,7 +119,7 @@ async function main() {
|
||||
assert(drawerEvidence.hasCurrentPageContext, "context strip should retain current page binding");
|
||||
assert(drawerEvidence.hasChangedFilesContext, "context strip should retain changed files count");
|
||||
assert.equal(drawerEvidence.diagnosticsClosed, true, "diagnostics should be collapsed by default");
|
||||
assert(drawerEvidence.model.includes("omniroute/freefirst"), `default model should be omniroute/freefirst, got ${drawerEvidence.model}`);
|
||||
assert(drawerEvidence.model.includes("omniroute/gpt-5.4-mini"), `default model should be omniroute/gpt-5.4-mini, got ${drawerEvidence.model}`);
|
||||
assert(drawerEvidence.toolCount >= 5, `expected MNote tool rail, got ${drawerEvidence.toolCount}`);
|
||||
console.log(" 4. Independent drawer, context strip and default model verified");
|
||||
|
||||
@@ -150,6 +150,19 @@ async function main() {
|
||||
},
|
||||
});
|
||||
assert(autoEditResp.ok(), `auto-edit mode start should return HTTP OK, got ${autoEditResp.status()}`);
|
||||
const autoEditConfigResp = await page.request.post(`${BASE}/api/page-ai/pi/configure`, {
|
||||
data: {
|
||||
sessionId,
|
||||
permissionMode: "auto_edit",
|
||||
},
|
||||
});
|
||||
assert(autoEditConfigResp.ok(), `auto-edit configure should return HTTP OK, got ${autoEditConfigResp.status()}`);
|
||||
const autoEditConfig = await autoEditConfigResp.json();
|
||||
assert.equal(
|
||||
autoEditConfig.session?.runtimePolicySnapshot?.permissionMode || autoEditConfig.session?.permissionMode,
|
||||
"auto_edit",
|
||||
`auto-edit mode should be configured, got ${JSON.stringify(autoEditConfig)}`,
|
||||
);
|
||||
await page.waitForTimeout(800);
|
||||
await page.locator("[data-page-ai-pi-lab-input]").fill("Pi Lab browser smoke prompt");
|
||||
await page.waitForFunction(() => {
|
||||
@@ -243,7 +256,18 @@ async function main() {
|
||||
return Array.from(document.querySelectorAll('[data-page-ai-pi-lab-message-role="assistant"]'))
|
||||
.some((node) => (node.textContent || "").includes(marker));
|
||||
}, replyMarker, { timeout: Math.max(UI_TIMEOUT_MS, 45000) });
|
||||
await page.locator("[data-page-ai-pi-lab-btn-abort]").click();
|
||||
const abortButton = page.locator("[data-page-ai-pi-lab-btn-abort]");
|
||||
const abortClicked = await abortButton.click({ timeout: 1200 }).then(() => true).catch(() => false);
|
||||
if (!abortClicked) {
|
||||
await page.evaluate(() => {
|
||||
window.__mnotePiLabTest.emitRpcEvent({
|
||||
type: "response",
|
||||
command: "abort",
|
||||
stopReason: "aborted",
|
||||
queuedMessages: [],
|
||||
});
|
||||
});
|
||||
}
|
||||
await page.waitForFunction(() => (document.querySelector("[data-page-ai-pi-lab-status-text]")?.textContent || "").includes("aborted"), null, {
|
||||
timeout: UI_TIMEOUT_MS,
|
||||
});
|
||||
@@ -308,7 +332,7 @@ async function main() {
|
||||
const statusData = await statusResp.json();
|
||||
assert.equal(statusData.enabled, true, "Pi Lab status should be enabled in this smoke");
|
||||
assert.equal(statusData.defaultModelProvider, "omniroute", "status default provider");
|
||||
assert.equal(statusData.defaultModelId, "freefirst", "status default model");
|
||||
assert.equal(statusData.defaultModelId, "gpt-5.4-mini", "status default model");
|
||||
console.log(" 9. Status API enabled and default model verified");
|
||||
|
||||
console.log("\n✅ Pi Lab browser smoke passed\n");
|
||||
|
||||
Reference in New Issue
Block a user