Group dashboard activities under primary administration and tidy editorial overview
tests / ci (push) Waiting to run
tests / ci (push) Waiting to run
This commit is contained in:
@@ -5,6 +5,7 @@ namespace Tests\Feature;
|
||||
use App\Models\EconomicCluster;
|
||||
use App\Models\User;
|
||||
use App\Services\ClusterCompetitiveness;
|
||||
use App\Services\ContentManagement;
|
||||
use App\Services\PortalEditorialNativeNotices;
|
||||
use App\Services\PortalEditorialWorkflow;
|
||||
use App\Services\TerritorialRegistry;
|
||||
@@ -34,6 +35,19 @@ final class EditorialNativeNoticeTest extends TestCase
|
||||
$this->actingAsWithMfa($this->author);
|
||||
}
|
||||
|
||||
public function test_dashboard_navigation_uses_existing_scopes_and_does_not_expose_disabled_or_private_activities(): void
|
||||
{
|
||||
$service = app(ContentManagement::class);
|
||||
$items = $service->dashboardNavigation($this->author, $service->access($this->author));
|
||||
$this->assertSame(['label' => 'Visão geral', 'href' => '/management/editorial'], $items[0]);
|
||||
$this->assertContains('/management/clusters', array_column($items, 'href'));
|
||||
$outsider = User::factory()->create();
|
||||
$this->assertSame([], $service->dashboardNavigation($outsider, []));
|
||||
$this->assertSame([], $service->dashboardNavigation(null, []));
|
||||
config(['editorial_workflow.enabled' => false]);
|
||||
$this->assertSame([], $service->dashboardNavigation($this->author, $service->access($this->author)));
|
||||
}
|
||||
|
||||
public function test_cluster_events_use_the_common_inbox_and_recheck_current_scope_and_event_integrity(): void
|
||||
{
|
||||
$cluster = EconomicCluster::create(['code' => 'NOTICE-'.Str::random(12), 'name' => 'Synthetic notice cluster', 'sector' => 'Energy', 'status' => 'planned']);
|
||||
|
||||
Reference in New Issue
Block a user