skillhub/plugins/dsh/test/integration/select-field.mjs
XiaoSeS 3560679793
Some checks failed
Deploy Docs / build (push) Has been cancelled
Security / Dependency Review (push) Has been cancelled
Security / CodeQL (java-kotlin) (push) Has been cancelled
Security / CodeQL (javascript-typescript) (push) Has been cancelled
Security / CodeQL (python) (push) Has been cancelled
Deploy Docs / Deploy (push) Has been cancelled
feat(dsh): add native SkillHub plugin for DeepSeek Harness (#956)
Add the native SkillHub plugin for DeepSeek Harness with a scoped skill center, conversation search/install tools, exact-version installation and protected lifecycle management. Prepare the independently versioned 0.1.0 npm candidate with an empty default Registry and documented compatibility limits.

Keep formal specifications and executable regression tests; remove archived development screenshots and runtime reports from the final tree. Review fixes cover independent scopes, installed references, pre-staging recovery and idempotent discovery.

Signed-off-by: XiaoSeS <87064762+XiaoSeS@users.noreply.github.com>
2026-10-16 19:22:26 +08:00

14 lines
800 B
JavaScript

import assert from 'node:assert/strict';
const labels = { project: '当前项目', user: '当前用户', all: '全部范围', auto: '自动检测', show: '显示', hide: '隐藏', newest: '最新发布', downloads: '下载量', rating: '评分' };
export async function selectValue(trigger, value) {
assert(labels[value], `Unknown Select fixture value: ${value}`);
await trigger.click();
await trigger.page().getByRole('option', { name: labels[value], exact: true }).click();
assert.equal((await trigger.innerText()).trim(), labels[value]);
}
export async function selectedValue(trigger) {
const label = (await trigger.innerText()).trim();
const entry = Object.entries(labels).find(([, text]) => text === label);
assert(entry, `Unexpected Select label: ${label}`);
return entry[0];
}