Plugin-System; Neuigkeiten und Termine als mitgelieferte Plugins
- Plugins nach WordPress-Prinzip: plugin.json-Manifest mit Versions- und Abhängigkeitsprüfung, eigenes PSR-4-Autoloading, register()/boot(), activate()/deactivate()/uninstall(), Migrationen, Routen und Views je Plugin - plugins-core/ (mitgeliefert, aktiv bis zur Deaktivierung) und plugins/ (Kunden-Plugins, geschützt vor Updates, inaktiv bis zur Aktivierung) - Zustand in storage/app/plugins.json – Laden ohne Datenbankabfrage - Wiederherstellungsmodus: Ausnahmen und Fatal Errors beim Laden deaktivieren das Plugin, das Portal bleibt erreichbar - Hooks (Actions/Filter mit Prioritäten) und Registries für Navigation, Startseiten-Kacheln, Rechte und Admin-Seiten (Filament-Discovery) - Admin-Seite „Plugins“: aktivieren, deaktivieren, per ZIP installieren (ZIP-Slip-Schutz), löschen mit oder ohne Daten; abschaltbar per INHAUS_DISALLOW_FILE_MODS - Startseite komplett aus Kacheln; Plugin-Seiten als „slug::Seite“ - Version 0.3.0 Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
cc0020458f
commit
28ef1e4a20
155 changed files with 2762 additions and 573 deletions
|
|
@ -5,7 +5,6 @@ namespace Tests\Feature;
|
|||
use App\Models\User;
|
||||
use App\Support\Settings;
|
||||
use Illuminate\Foundation\Testing\RefreshDatabase;
|
||||
use Inertia\Testing\AssertableInertia as Assert;
|
||||
use Tests\TestCase;
|
||||
|
||||
class DashboardTest extends TestCase
|
||||
|
|
@ -14,11 +13,11 @@ class DashboardTest extends TestCase
|
|||
|
||||
public function test_dashboard_shows_default_quick_links(): void
|
||||
{
|
||||
$this->actingAs(User::factory()->create())
|
||||
->get('/')
|
||||
->assertInertia(fn (Assert $page) => $page
|
||||
->has('quickLinks', 2)
|
||||
->where('quickLinks.0.url', '/personen'));
|
||||
$response = $this->actingAs(User::factory()->create())->get('/')->assertOk();
|
||||
$links = $this->dashboardWidget($response, 'core.quick-links')['links'];
|
||||
|
||||
$this->assertCount(2, $links);
|
||||
$this->assertSame('/personen', $links[0]['url']);
|
||||
}
|
||||
|
||||
public function test_configured_quick_links_are_sanitized(): void
|
||||
|
|
@ -28,13 +27,12 @@ class DashboardTest extends TestCase
|
|||
['label' => 'Böse', 'url' => 'javascript:alert(1)', 'icon' => 'unbekannt'],
|
||||
]);
|
||||
|
||||
$this->actingAs(User::factory()->create())
|
||||
->get('/')
|
||||
->assertInertia(fn (Assert $page) => $page
|
||||
->where('quickLinks.0.icon', 'clock')
|
||||
->where('quickLinks.0.new_tab', true)
|
||||
->where('quickLinks.1.url', '#')
|
||||
->where('quickLinks.1.icon', 'link'));
|
||||
$links = $this->dashboardWidget($this->actingAs(User::factory()->create())->get('/'), 'core.quick-links')['links'];
|
||||
|
||||
$this->assertSame('clock', $links[0]['icon']);
|
||||
$this->assertTrue($links[0]['new_tab']);
|
||||
$this->assertSame('#', $links[1]['url']);
|
||||
$this->assertSame('link', $links[1]['icon']);
|
||||
}
|
||||
|
||||
public function test_new_colleagues_exclude_self_inactive_and_old_accounts(): void
|
||||
|
|
@ -44,12 +42,12 @@ class DashboardTest extends TestCase
|
|||
User::factory()->inactive()->create();
|
||||
User::factory()->create(['created_at' => now()->subYear()]);
|
||||
|
||||
$this->actingAs($me)
|
||||
->get('/')
|
||||
->assertInertia(fn (Assert $page) => $page
|
||||
->has('newColleagues.data', 1)
|
||||
->where('newColleagues.data.0.id', $new->id)
|
||||
->where('peopleCount', 3));
|
||||
$response = $this->actingAs($me)->get('/');
|
||||
|
||||
$people = $this->dashboardWidget($response, 'core.new-colleagues')['people'];
|
||||
$this->assertCount(1, $people);
|
||||
$this->assertSame($new->id, $people[0]['id']);
|
||||
$this->assertSame(3, $this->dashboardWidget($response, 'core.people-search')['count']);
|
||||
}
|
||||
|
||||
public function test_brand_colors_are_rendered_as_css_variables(): void
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue