mock: バリアントの既定の印・バッジ・作成先を直す(T-30 単位3)

ポップオーバーの既定の印を「既定」の札にする。バッジには名前を書かず、
表示中のバリアント名はツールチップで示す(はみ出しをなくす。T-30の着手前の決定を反映)。
バリアントグループは選択の入れ物(クラスター・バリアント)の中に作る。
そのため domain に createVariantGroupInParent を足し、variant のIDを渡すと
例外になっていた parentNodes を直した。

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NznQtmVPoQAnietqwr1auL
This commit is contained in:
2026-10-22 09:19:06 +09:00
co-authored by Claude Opus 5.5
parent fe1b048ea4
commit 38954e9b36
7 changed files with 90 additions and 19 deletions
+20
View File
@@ -257,6 +257,26 @@ test("選択枠は画面上で見え、バリアントバッジで表示を切
await expect(keys).toHaveCount(16);
});
test("クラスター内のキーから作ったバリアントグループはクラスターの中にでき、バッジは名前を書かない", async ({
page,
}) => {
const cluster = await makeCluster(page);
const key = cluster.locator('[data-node-type="key"]').first();
await key.click();
await page.getByRole("button", { name: "選択からバリアントグループ" }).click();
const group = cluster.locator('[data-node-type="variantGroup"]');
await expect(group).toHaveCount(1);
const badge = group.locator(".badge");
await expect(badge.locator("text")).toHaveText("⇄");
await expect(badge.locator("title")).toHaveText("Variant Group: Option A(既定)");
await badge.locator("rect").click();
const popover = page.locator(".popover");
await expect(popover.getByRole("button", { name: /Option A/ }).locator(".default-tag")).toHaveText("既定");
await expect(popover.getByRole("button", { name: /Option B/ }).locator(".default-tag")).toHaveCount(0);
await popover.getByRole("button", { name: /Option B/ }).click();
await expect(badge.locator("title")).toHaveText("Variant Group: Option B");
});
test("削除確認は参照を列挙し、実行後はIDXからも消える", async ({ page }) => {
const key = page.locator('[data-node-type="key"]').first();
const id = await key.getAttribute("data-node-id");