feat: design-system filters and global module ids in node-get/outline (S19)
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:
@@ -123,4 +123,19 @@ final class DiviReadAbilitiesTest extends TestCase
|
||||
self::assertToolError($ability->execute(['post_id' => 7, 'id' => 'hero']), 'validation_failed');
|
||||
self::assertToolError($ability->execute(['post_id' => 7, 'id' => 's5.r0']), 'not_found');
|
||||
}
|
||||
|
||||
public function testNodeGetNamesTheLibraryEntryOfAGlobalModule(): void
|
||||
{
|
||||
DiviFixtures::givenPost(DiviFixtures::markup('stage3/page--globale-instanzen.html'));
|
||||
$ability = new DiviNodeGetAbility(new DiviPageLoader(DiviFixtures::schema()), $this->design());
|
||||
|
||||
$global = $ability->execute(['post_id' => 7, 'id' => 'g0']);
|
||||
$plain = $ability->execute(['post_id' => 7, 'id' => 's0']);
|
||||
|
||||
self::assertSame('1058', $global['global']['id']);
|
||||
self::assertSame('divi/section', $global['global']['block_name']);
|
||||
self::assertStringContainsString('post_id 1058', $global['global']['hint']);
|
||||
self::assertFalse($global['editable']);
|
||||
self::assertNull($plain['global']);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user