fix(dsh): preserve acrylic and restore durable native model settings
Core regression / Python core and release configuration (push) Successful in 15s
Core regression / JavaScript syntax (push) Successful in 3s
Core regression / Python core and release configuration (pull_request) Successful in 15s
Core regression / JavaScript syntax (pull_request) Successful in 3s

This commit is contained in:
阿白叔 committed 2026-11-03 11:41:50 +08:00
1 parent 3cec9adc5f
commit 374e1cd5bf
11 files changed
+262 -17

No files matched your search

+16 -4
View File
@@ -33,9 +33,21 @@ try {
assert.equal(await c.evaluate(`${accountEntries}.length`),0);
report.checks.push('one click opens native tool settings with DSH capabilities and no account entry');
await c.screenshot(path.join(output,'dsh-tool-settings.png'));
await c.call('Input.dispatchKeyEvent',{type:'keyDown',key:'Escape',code:'Escape'});
await c.call('Input.dispatchKeyEvent',{type:'keyUp',key:'Escape',code:'Escape'});
await wait(`!document.querySelector('[data-testid="dx-tool-settings-panel"]')`);
await c.click(`[...document.querySelectorAll('[data-shortcut-modal="settings"] nav button')].find(e=>e.textContent.trim()==='模型')`);
await wait(`document.body.innerText.includes('自定义模型 API')||document.body.innerText.includes('添加模型提供商')`);
if(!await c.evaluate(`document.body.innerText.includes('自定义模型 API')`))
await c.click(`[...document.querySelectorAll('button')].find(e=>e.textContent.includes('添加模型提供商'))`);
await wait(`document.body.innerText.includes('自定义模型 API')`);
await c.click(`[...document.querySelectorAll('button')].find(e=>e.textContent.trim()==='自定义模型 API')`);
await wait(`!!document.querySelector('input[aria-label="Provider ID"]')&&document.body.innerText.includes('获取可用模型')`);
report.checks.push('actual model settings clicks reveal custom API and fetch-model controls');
await c.screenshot(path.join(output,'dsh-custom-model-settings.png'));
if(process.argv.includes('--model-settings-check')){
const {verifyModelSettings}=await import('./verify_dsh_model_settings.mjs');
report.modelSettings=await verifyModelSettings(c,output);
}
await c.click(`[...document.querySelectorAll('[data-shortcut-modal="settings"] button')].find(e=>e.textContent.trim()==='关闭')`);
await wait(`!document.querySelector('[role="dialog"]')`);
await c.screenshot(path.join(output,'dsh-tool-home.png'));
const context=await c.evaluate(`fetch('/dx/context').then(r=>r.json())`);
assert.ok(context.task_id,'Select a task in the task center before running this test.');
@@ -92,7 +104,7 @@ try {
report.checks.push('real API reply rendered through the official Harness conversation');
await c.click(`document.querySelector('[contenteditable="true"]')`);
await c.call('Input.insertText',{text:'请分析当前任务的下一步。'});
} else report.reason='No model credential configured in this isolated acceptance profile.';
} else report.reason='Live model generation was not requested for this acceptance run.';
await c.screenshot(path.join(output,'dsh-native-final.png'));
if(process.argv.includes('--confirm-cancel')) {
await c.click(`[...document.querySelectorAll('button')].find(e=>e.textContent.trim()==='准备失败项重试')`);