修复角色规范参考图前端回归测试
Project CI / Backend tests (pull_request) Failing after 9s
Project CI / Repository checks (pull_request) Failing after 13s
Project CI / Frontend tests (pull_request) Successful in 2m58s
Project CI / Native shell tests (pull_request) Successful in 15m55s

兼容画布参考图只读槽位的 aria-label 断言

等待画布选择参考图状态完成后再校验面板
This commit is contained in:
2026-08-12 17:10:37 +08:00
parent d9e1a34b7c
commit 19c56f0f99
@@ -194,7 +194,12 @@ describe('ImageCanvasEditorView generation integration', () => {
candidate.getAttribute('title') === label ||
candidate.textContent?.includes(label),
);
expect(button).toBeTruthy();
const chip =
button ??
Array.from(panel.querySelectorAll('[aria-label]')).find(
(candidate) => candidate.getAttribute('aria-label') === label,
);
expect(chip).toBeTruthy();
};
const createGeneratedResource = ({
@@ -2361,10 +2366,12 @@ describe('ImageCanvasEditorView generation integration', () => {
clientY: 120,
},
);
await waitFor(() => {
expectReferenceChip(
screen.getByRole('dialog', { name: '生成规范' }),
'拼图素材',
);
});
await userEvent.click(
within(screen.getByRole('dialog', { name: '生成规范' })).getByRole(