补齐场景素材快速编辑白名单
Project CI / Repository checks (pull_request) Successful in 1m26s
Project CI / Frontend tests (pull_request) Successful in 3m0s
Project CI / Backend tests (pull_request) Successful in 4m8s
Project CI / Native shell tests (pull_request) Successful in 15m38s

同步前端与后端场景快速编辑准入
锁定用户素材标签覆盖的双端白名单
补充新增素材类型的快速编辑检查点
更新场景与画布契约文档
This commit is contained in:
2026-08-08 12:19:59 +08:00
parent 3c07a96a07
commit cd78077e95
9 changed files with 50 additions and 4 deletions
@@ -435,6 +435,12 @@ describe('ImageCanvasGenerationModel', () => {
assetKind: 'icon-spritesheet',
}),
).toBe(true);
expect(
isQuickEditSupportedLayer({
...buildSourceLayer(),
assetKind: 'scene',
}),
).toBe(true);
expect(
isQuickEditSupportedLayer({
...buildSourceLayer(),
@@ -686,6 +686,7 @@ const QUICK_EDIT_SUPPORTED_ASSET_KINDS = new Set<CanvasLayer['assetKind']>([
'icon-spec',
'publication-material',
'ui-design',
'scene',
'video',
]);
@@ -1108,6 +1108,28 @@ describe('ImageCanvasWorldView', () => {
}
});
it('offers scene as a user-selectable label for image layers', () => {
const imageLayer = createLayer({
resourceAssetKind: 'image',
assetKind: 'character',
});
const { props } = renderWorldView({ layers: [imageLayer] });
fireEvent.click(screen.getByRole('button', { name: '素材标签:角色' }));
const sceneItem = within(
screen.getByRole('menu', { name: '选择素材标签' }),
).getByRole('menuitem', { name: '场景' });
expect(sceneItem.hasAttribute('disabled')).toBe(false);
fireEvent.click(sceneItem);
expect(props.onUpdateLayerAssetKind).toHaveBeenCalledWith(
imageLayer.id,
'scene',
);
});
it('hides resolution and duration text for focused audio generation frames', () => {
const dialog = createGenerationDialog({
id: 'dialog-audio',