Commit 0c6036f0 authored by Mahmoud Aglan's avatar Mahmoud Aglan

Add browser-accessible smoke test at /tools/smoke-test

- Visit /tools/smoke-test in browser to get full HTML report
- Dark UI with stats cards, error details, and "Copy for Claude" button
- Requires settings.edit permission (admin only)
- Still works via CLI: php tools/smoke_test.php [url] [email] [pass]
Co-Authored-By: 's avatarClaude Opus 4.6 <noreply@anthropic.com>
parent b60d3139
<?php
declare(strict_types=1);
namespace App\Modules\Settings\Controllers;
use App\Core\Controller;
use App\Core\Request;
use App\Core\Response;
class SmokeTestController extends Controller
{
public function run(Request $request): Response
{
$this->authorize('settings.edit');
ob_start();
require __DIR__ . '/../../../../tools/smoke_test.php';
$html = ob_get_clean();
return (new Response())->html($html);
}
}
......@@ -11,4 +11,7 @@ return [
['POST', '/settings/branding/logo', 'Settings\Controllers\BrandingController@updateLogo', ['auth', 'csrf'], 'settings.edit'],
['POST', '/settings/branding/carnet', 'Settings\Controllers\BrandingController@updateCarnetDesign', ['auth', 'csrf'], 'settings.edit'],
['POST', '/settings/branding/receipt', 'Settings\Controllers\BrandingController@updateReceiptDesign',['auth', 'csrf'], 'settings.edit'],
// Smoke Test Tool
['GET', '/tools/smoke-test', 'Settings\Controllers\SmokeTestController@run', ['auth'], 'settings.edit'],
];
\ No newline at end of file
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment