|
|
|
|
@ -5,6 +5,7 @@ $servicePath = $root . '/app/Services/Cloud/CloudAdminOverviewService.php';
|
|
|
|
|
$controllerPath = $root . '/app/Controllers/AdminController.php';
|
|
|
|
|
$templatePath = $root . '/resources/views/venix/admin/index.tpl';
|
|
|
|
|
$headerPath = $root . '/resources/views/venix/admin/static_header.tpl';
|
|
|
|
|
$footerPath = $root . '/resources/views/venix/admin/static_footer.tpl';
|
|
|
|
|
$sharedStylePath = $root . '/public/theme/venix/css/admin-home.css';
|
|
|
|
|
$removedStylePath = $root . '/public/cloud/admin-overview.css';
|
|
|
|
|
$schemaPath = $root . '/sql/cloud.sql';
|
|
|
|
|
@ -23,6 +24,7 @@ $service = file_get_contents($servicePath);
|
|
|
|
|
$controller = file_get_contents($controllerPath);
|
|
|
|
|
$template = file_get_contents($templatePath);
|
|
|
|
|
$header = file_get_contents($headerPath);
|
|
|
|
|
$footer = file_get_contents($footerPath);
|
|
|
|
|
$styles = file_get_contents($sharedStylePath);
|
|
|
|
|
$schema = file_get_contents($schemaPath);
|
|
|
|
|
$baseSchema = file_get_contents($baseSchemaPath);
|
|
|
|
|
@ -101,4 +103,16 @@ $assert(str_contains($header, '/theme/venix/css/admin-home.css')
|
|
|
|
|
&& str_contains($styles, '@media (max-width: 575.98px)'),
|
|
|
|
|
'Overview must inherit the existing administrator component and responsive rules.');
|
|
|
|
|
|
|
|
|
|
$assert(preg_match('/\.admin-template \.app-sidebar-menu\s*\{(?=[^}]*height:\s*100vh)(?=[^}]*height:\s*100dvh)[^}]*\}/s', $styles)
|
|
|
|
|
&& preg_match('/\.admin-template-body\.admin-sidebar-open \.admin-sidebar-backdrop\s*\{(?=[^}]*height:\s*100vh)(?=[^}]*height:\s*100dvh)[^}]*\}/s', $styles)
|
|
|
|
|
&& str_contains($footer, "window.addEventListener('pagehide', closeSidebar)")
|
|
|
|
|
&& str_contains($footer, "window.addEventListener('pageshow'")
|
|
|
|
|
&& str_contains($footer, 'event.persisted')
|
|
|
|
|
&& str_contains($footer, 'target.pathname === current.pathname')
|
|
|
|
|
&& str_contains($footer, 'target.search === current.search')
|
|
|
|
|
&& str_contains($footer, 'target.hash === current.hash')
|
|
|
|
|
&& str_contains($footer, 'event.preventDefault();')
|
|
|
|
|
&& !preg_match('/link\.addEventListener\(\'click\'.*?window\.innerWidth <= 991.*?closeSidebar\(\);/s', $footer),
|
|
|
|
|
'Mobile administrator navigation must cover the dynamic viewport and keep its overlay during cross-page navigation.');
|
|
|
|
|
|
|
|
|
|
echo 'Administrator operational overview contracts passed.' . PHP_EOL;
|
|
|
|
|
|