feat: tambah fitur impor excel karyawan hse, perapian sidebar pg, dan bel notifikasi suara asisten verifikasi gerbang

This commit is contained in:
Ray1111-aa
2026-10-17 08:48:32 +07:00
parent 6e5ae727f9
commit 034da013d3
14 changed files with 1567 additions and 159 deletions
+33
View File
@@ -299,4 +299,37 @@ class SuperAdminRbacTest extends TestCase
$resDeniedAgain = $this->actingAs($gateUser->fresh())->get(route('qma.activity.log'));
$resDeniedAgain->assertForbidden();
}
public function test_super_admin_can_sort_users_by_latest_oldest_and_name(): void
{
$superAdmin = User::where('username', 'superadmin')->first();
$userA = User::factory()->create([
'name' => 'AAA User First',
'username' => 'aaa_first',
'email' => '[email protected]',
'created_at' => now()->subDays(10),
]);
$userZ = User::factory()->create([
'name' => 'ZZZ User Last',
'username' => 'zzz_last',
'email' => '[email protected]',
'created_at' => now()->subDays(1),
]);
// Sort Name Ascending
$resAsc = $this->actingAs($superAdmin)->get(route('admin.users.index', ['sort' => 'name_asc']));
$resAsc->assertOk();
$resAsc->assertSeeInOrder(['AAA User First', 'ZZZ User Last']);
// Sort Name Descending
$resDesc = $this->actingAs($superAdmin)->get(route('admin.users.index', ['sort' => 'name_desc']));
$resDesc->assertOk();
$resDesc->assertSeeInOrder(['ZZZ User Last', 'AAA User First']);
// Sort Oldest
$resOldest = $this->actingAs($superAdmin)->get(route('admin.users.index', ['sort' => 'oldest']));
$resOldest->assertOk();
$resOldest->assertSee('Urutkan:');
}
}