fix: Task 6 review round 1 - admin label overlap, heading default level, structure deny-list, row widths (S41)
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01At3V6SjwbMe6eMzVGW3Hs7
This commit is contained in:
@@ -510,5 +510,24 @@ final class AttrWriterTest extends TestCase
|
||||
self::assertSame($reference, $deep['attrs']['button']['innerContent']['desktop']['value']['text']);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/** Ruling S41: structure attributes are refused whatever the catalog says (also for admins, also null). */
|
||||
public function testStructureAttributesAreRefused(): void
|
||||
{
|
||||
foreach ([
|
||||
['divi/section', 'module.advanced.type', ['desktop' => 'specialty']],
|
||||
['divi/section', 'module.advanced.type', null],
|
||||
['divi/section', 'module.advanced', ['desktop' => ['type' => 'fullwidth']]],
|
||||
['divi/column', 'module.advanced.specialtyColumns', ['desktop' => '2']],
|
||||
] as [$module, $path, $map]) {
|
||||
$result = ComposeFixture::attrWriter(true)->apply($module, [], [$path => $map], 'attrs');
|
||||
|
||||
self::assertStringContainsString('Struktur', $result['errors']['attrs.' . $path] ?? '', $module . ' ' . $path);
|
||||
self::assertSame([], $result['invalid_paths'], $path);
|
||||
self::assertSame([], $result['attrs'], $path);
|
||||
}
|
||||
|
||||
$heading = ComposeFixture::attrWriter()->apply('divi/heading', [], ['module.meta.adminLabel' => ['desktop' => 'x']], 'attrs');
|
||||
self::assertSame([], $heading['errors'], 'only section type and specialty columns are structure');
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user