Keep a checkbox from toggling when the empty part of its row is clicked

Check labels spanned the full width, so a click in the empty middle of
"Als Button darstellen" unticked it and folded the menu button settings.
The label now ends after its text.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
kantarciandClaude Opus 5.5 committed 2026-10-07 22:39:57 +02:00
1 parent 13f6759df8
commit 8e628b9417
2 files changed
+10 -2

No files matched your search

+7 -1
View File
@@ -47,6 +47,12 @@ try {
await row.getByLabel('Als Button darstellen').check();
const options = row.locator('[data-button-options]');
await options.waitFor();
// Ein Klick in die leere Mitte der Häkchenzeile schaltet nichts um.
const box = await row.locator('[data-button-fields]').boundingBox();
const label = await row.locator('label[for^="menu-button-"]').boundingBox();
await page.mouse.click(box.x + box.width * 0.6, label.y + label.height / 2);
assert.equal(await row.getByLabel('Als Button darstellen').isChecked(), true, 'Klick in die Leere klappt die Einstellungen nicht zu');
assert.equal(await options.isVisible(), true);
await options.getByLabel('Form').selectOption('pill');
// Symbol über das Fenster.
await row.getByRole('button', { name: /Symbol ändern/ }).click();
@@ -68,7 +74,7 @@ try {
const axe = await new AxeBuilder({ page }).include('.menu-entry:last-child').analyze();
assert.deepEqual(axe.violations.map(v => v.id), [], 'axe in der Menüzeile');
await row.screenshot({ path: `${report}/verwaltung.png` });
checks.push('Verwaltung: Häkchen zeigt Optionen, Pille, Symbol aus dem Fenster, Palettenfarbe als Verweis, Vorschau mit Symbol, axe ohne Befund');
checks.push('Verwaltung: Häkchen zeigt Optionen, Klick in die leere Zeile schaltet nichts um, Pille, Symbol aus dem Fenster, Palettenfarbe als Verweis, Vorschau mit Symbol, axe ohne Befund');
// Zweiter Button bleibt auf dem Telefon im aufgeklappten Menü (Vorgabe).
await page.locator('#link-label').fill('Rückruf');