feat(search): refresh global search UI and align qa/docs updates
This commit is contained in:
@@ -38,8 +38,8 @@ class AuditSearchResourceProviderTest extends TestCase
|
||||
{
|
||||
$resources = $this->provider->resources();
|
||||
|
||||
$this->assertSame('api_audit.view', $resources['api-audit']['permission']);
|
||||
$this->assertSame('system_audit.view', $resources['system-audit']['permission']);
|
||||
$this->assertSame('audit.api.view', $resources['api-audit']['permission']);
|
||||
$this->assertSame('audit.system.view', $resources['system-audit']['permission']);
|
||||
}
|
||||
|
||||
public function testMapApiAuditItem(): void
|
||||
@@ -50,6 +50,7 @@ class AuditSearchResourceProviderTest extends TestCase
|
||||
'path' => '/api/v1/users',
|
||||
'status_code' => 201,
|
||||
'request_id' => 'req-abc',
|
||||
'created_at' => '2026-03-15 10:30:00',
|
||||
];
|
||||
|
||||
$result = $this->provider->mapResultItem('api-audit', $row);
|
||||
@@ -57,7 +58,7 @@ class AuditSearchResourceProviderTest extends TestCase
|
||||
$this->assertNotNull($result);
|
||||
$this->assertSame('POST /api/v1/users', $result['title']);
|
||||
$this->assertStringContains('201', $result['subtitle']);
|
||||
$this->assertStringContains('req-abc', $result['subtitle']);
|
||||
$this->assertStringContains('2026-03-15 10:30:00', $result['subtitle']);
|
||||
$this->assertSame('bi-shield-check', $result['icon']);
|
||||
$this->assertStringContainsString('admin/api-audit/view/42', $result['url']);
|
||||
}
|
||||
@@ -88,6 +89,7 @@ class AuditSearchResourceProviderTest extends TestCase
|
||||
'event_type' => 'admin.settings.update',
|
||||
'outcome' => 'success',
|
||||
'request_id' => 'req-xyz',
|
||||
'created_at' => '2026-03-15 11:00:00',
|
||||
];
|
||||
|
||||
$result = $this->provider->mapResultItem('system-audit', $row);
|
||||
@@ -95,6 +97,7 @@ class AuditSearchResourceProviderTest extends TestCase
|
||||
$this->assertNotNull($result);
|
||||
$this->assertSame('admin.settings.update', $result['title']);
|
||||
$this->assertStringContains('SUCCESS', $result['subtitle']);
|
||||
$this->assertStringContains('2026-03-15 11:00:00', $result['subtitle']);
|
||||
$this->assertSame('bi-journal-lock', $result['icon']);
|
||||
$this->assertStringContainsString('admin/system-audit/view/99', $result['url']);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user