feat: Divi tab with REST check, release and withdrawal

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-09-30 02:39:21 +02:00
co-authored by Claude Opus 5.5
parent 47040aa43d
commit 6113e5ad5a
13 changed files with 849 additions and 18 deletions
+27
View File
@@ -158,4 +158,31 @@ final class SettingsPageTest extends TestCase
$page->register();
}
/** @dataProvider diviNotices */
public function testDiviNoticesAreShown(string $key, string $class, string $text): void
{
Functions\when('current_user_can')->justReturn(true);
$_GET['lit_mcp_notice'] = $key;
ob_start();
(new SettingsPage([$this->tab('verbindung', 'Verbindung')]))->render();
$html = (string) ob_get_clean();
self::assertStringContainsString('notice-' . $class, $html);
self::assertStringContainsString($text, $html);
}
/** @return list<list<string>> */
public static function diviNotices(): array
{
return [
['divi_checked', 'success', 'Divi-Prüfung abgeschlossen'],
['divi_check_running', 'warning', 'bereits eine Divi-Prüfung'],
['divi_released', 'success', 'für LIT MCP freigegeben'],
['divi_release_refused', 'error', 'Prüfung erneut ausführen'],
['divi_withdrawn', 'success', 'Freigabe zurückgezogen'],
['divi_withdraw_failed', 'error', 'keine Freigabe'],
];
}
}