Separate dashboard functions from grouped administration operations
tests / ci (push) Canceled after 0s
tests / ci (push) Canceled after 0s
This commit is contained in:
@@ -39,13 +39,17 @@ final class EditorialNativeNoticeTest extends TestCase
|
||||
{
|
||||
$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'));
|
||||
$this->assertSame(['label' => 'Visão geral', 'href' => '/dashboard'], $items[0]);
|
||||
$this->assertNotContains('/management/clusters', array_column($items, 'href'));
|
||||
$this->assertContains('/management/clusters', array_column($service->administrationNavigation($this->author, $service->access($this->author)), 'href'));
|
||||
$this->assertContains('/dashboard#manifestacoes', 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)));
|
||||
$after = array_column($service->dashboardNavigation($this->author, $service->access($this->author)), 'href');
|
||||
$this->assertContains('/dashboard', $after);
|
||||
$this->assertNotContains('/management/editorial', $after);
|
||||
}
|
||||
|
||||
public function test_cluster_events_use_the_common_inbox_and_recheck_current_scope_and_event_integrity(): void
|
||||
|
||||
Reference in New Issue
Block a user