feat: lit-site-status, Admin-Tab und Admin-Hinweis zeigen Divi-Fähigkeiten mit Zustand, Quelle, Problemen und betroffenen Werkzeugen
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 5.5
parent
b92545a8fe
commit
2aef6e1154
@@ -33,4 +33,28 @@ final class SiteStatusAbilityTest extends TestCase
|
||||
self::assertSame(['administrator', 'editor'], $result['allowed_roles']);
|
||||
self::assertSame('divi', $result['components'][0]['id']);
|
||||
}
|
||||
|
||||
public function testTheOutputSchemaDescribesTheDiviFeatures(): void
|
||||
{
|
||||
$schema = (new SiteStatusAbility(Mockery::mock(EnvironmentProbe::class), new Access()))->outputSchema();
|
||||
$component = $schema['properties']['components']['items'];
|
||||
$feature = $component['properties']['features']['items'];
|
||||
|
||||
self::assertSame(['id', 'active', 'version', 'problems', 'release'], $component['required']);
|
||||
self::assertSame(
|
||||
['id', 'label', 'state', 'source', 'problems', 'tools'],
|
||||
$feature['required']
|
||||
);
|
||||
self::assertSame(['released', 'untested', 'incompatible'], $feature['properties']['state']['enum']);
|
||||
self::assertSame(['string', 'null'], $feature['properties']['source']['type']);
|
||||
}
|
||||
|
||||
public function testTheDescriptionNamesTheFeaturesAndSaysOtherToolsKeepWorking(): void
|
||||
{
|
||||
$description = (new SiteStatusAbility(Mockery::mock(EnvironmentProbe::class), new Access()))->description();
|
||||
|
||||
self::assertStringContainsString('features je Fähigkeit', $description);
|
||||
self::assertStringContainsString('(code, database, auto)', $description);
|
||||
self::assertStringContainsString('alle anderen Divi-Werkzeuge laufen weiter', $description);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user