feat: lit/divi-node-copy between pages and library entries
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -29,6 +29,7 @@ final class DiviIntegrationTest extends TestCase
|
||||
'lit/divi-delete',
|
||||
'lit/divi-duplicate-node',
|
||||
'lit/divi-replace-text',
|
||||
'lit/divi-node-copy',
|
||||
];
|
||||
|
||||
public function testProvidesTheDiviAbilitiesOnlyWithDivi5(): void
|
||||
@@ -67,6 +68,25 @@ final class DiviIntegrationTest extends TestCase
|
||||
}
|
||||
}
|
||||
|
||||
/** Ruling P9 (E9): lit/divi-node-copy follows lit/divi-insert's Tools-tab state. */
|
||||
public function testNodeCopyFollowsLitDiviInsert(): void
|
||||
{
|
||||
$integration = new DiviIntegration(
|
||||
Mockery::mock(ContentSchema::class),
|
||||
FakeChangeLog::forbidden(),
|
||||
diviWritable: static fn (): bool => false
|
||||
);
|
||||
$copy = null;
|
||||
foreach ($integration->abilities() as $ability) {
|
||||
if ($ability->name() === 'lit/divi-node-copy') {
|
||||
$copy = $ability;
|
||||
}
|
||||
}
|
||||
|
||||
self::assertNotNull($copy);
|
||||
self::assertToolError($copy->permission(['post_id' => 7, 'source_post_id' => 8]), 'unsupported');
|
||||
}
|
||||
|
||||
public function testGivesContentCreateTheDiviShortForm(): void
|
||||
{
|
||||
$integration = new DiviIntegration(Mockery::mock(ContentSchema::class), FakeChangeLog::forbidden());
|
||||
|
||||
Reference in New Issue
Block a user