## Summary - restore broad full-suite green-signal coverage across platform governance, operations, onboarding, dashboard/productization, and customer review flows - align related platform tests and supporting behavior with the current expected state for this restoration pass - update the spec-candidates queue as part of the same suite-restoration sweep ## Validation - `cd apps/platform && ./vendor/bin/sail artisan test --compact tests/Browser/Dashboard/TenantDashboardProductizationSmokeTest.php tests/Browser/Reviews/CustomerReviewWorkspaceSmokeTest.php tests/Browser/Spec194GovernanceFrictionSmokeTest.php tests/Browser/Spec265DecisionRegisterSmokeTest.php` Co-authored-by: Ahmed Darrazi <ahmed.darrazi@live.de> Reviewed-on: #351
41 lines
1.5 KiB
PHP
41 lines
1.5 KiB
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
use App\Support\Workspaces\WorkspaceContext;
|
|
use Filament\Facades\Filament;
|
|
|
|
it('keeps database notifications enabled without background polling on every panel', function (): void {
|
|
foreach (['admin', 'system'] as $panelId) {
|
|
$panel = Filament::getPanel($panelId);
|
|
|
|
expect($panel->hasDatabaseNotifications())->toBeTrue();
|
|
expect($panel->getDatabaseNotificationsPollingInterval())->toBeNull();
|
|
}
|
|
});
|
|
|
|
it('renders the admin notifications modal without a polling attribute', function (): void {
|
|
[$user, $tenant] = createUserWithTenant(role: 'owner');
|
|
|
|
$response = $this->actingAs($user)
|
|
->withSession([
|
|
WorkspaceContext::SESSION_KEY => (int) $tenant->workspace_id,
|
|
WorkspaceContext::LAST_TENANT_IDS_SESSION_KEY => [
|
|
(string) $tenant->workspace_id => (int) $tenant->getKey(),
|
|
],
|
|
])
|
|
->get(route('admin.workspace.home', ['workspace' => $tenant->workspace]));
|
|
|
|
$response->assertSuccessful();
|
|
|
|
$html = $response->getContent();
|
|
|
|
expect($html)->toContain('wire:name="Filament\\Livewire\\DatabaseNotifications"');
|
|
|
|
preg_match('/<[^>]+wire:name="Filament\\\\Livewire\\\\DatabaseNotifications"[^>]*>/', $html, $matches);
|
|
|
|
expect($matches)->not->toBeEmpty('Expected the admin page to render the database notifications Livewire root element.');
|
|
expect($matches[0])->not->toContain('wire:poll');
|
|
expect($matches[0])->not->toContain('wire:poll.30s');
|
|
});
|