[Operator] Perbaikan Laman Portal -> Konsultasi

This commit is contained in:
Ariyutta
2026-11-11 09:28:34 +07:00
parent 52d49cdb41
commit d6425a601d
19 changed files with 1134 additions and 301 deletions
@@ -56,7 +56,7 @@ class LegacyEmployeeListTest extends TestCase
'headers' => $texts("{$panel}//thead/tr/th"),
'filters' => $texts("//section[@aria-label='Filter data']//label"),
'tools' => $texts("{$panel}//div[contains(@class, 'satu-bar__tools')]//button"),
'row_actions' => array_map(fn ($node): string => $node->getAttribute('aria-label'), iterator_to_array($xpath->query("{$panel}//tbody//td[contains(@class, 'table__actions')]//button"))),
'row_actions' => array_map(fn ($node): string => $node->getAttribute('aria-label'), iterator_to_array($xpath->query("{$panel}//tbody//td[contains(@class, 'table__actions')]//*[self::button or self::a]"))),
'pager' => $xpath->query("//nav[@aria-label='Halaman data']")->length,
];
}
@@ -71,8 +71,8 @@ class LegacyEmployeeListTest extends TestCase
$this->assertSame(['', 'NIP', 'Nama', 'L/P', 'NIDN', 'NUPTK', 'No. Telp.', 'Email', 'Status', 'Aksi'], $legacy['headers']);
$this->assertSame(['Kuota Pembimbing Akademik', 'Status Aktif', 'Status'], $legacy['filters']);
$this->assertSame(['Cetak'], $legacy['tools']);
$this->assertSame(['Lihat', 'Ubah', 'Hapus'], $legacy['row_actions']);
$this->assertSame(['Tambah', 'Hapus'], $legacy['tools']);
$this->assertSame(['Lihat', 'Hapus'], $legacy['row_actions']);
$this->assertSame(0, $this->dom($response)->query('//main//form[not(ancestor::dialog)]')->length, 'Filter tidak memakai formulir (alamat tetap).');
$this->assertSame(1, $this->dom($response)->query("//a[@aria-current='page' and contains(@href, '/list_pegawai')]")->length);
@@ -82,7 +82,9 @@ class LegacyEmployeeListTest extends TestCase
Auth::forgetGuards();
$prototype = $this->actingAs(User::factory()->operator()->create())->get(route('operator.halaman', 'list_pegawai'))->assertOk();
$expected = $this->layout($this->dom($prototype));
$expected['tools'] = array_values(array_diff($expected['tools'], ['Aksi'])); // tombol Aksi tanpa fungsi disembunyikan di akun asli
// Akun asli: tanpa Aksi dan Cetak, dengan Tambah dan Hapus yang sudah bekerja; baris tanpa Ubah (diubah di halaman detail).
$expected['tools'] = ['Tambah', 'Hapus'];
$expected['row_actions'] = ['Lihat', 'Hapus'];
$this->assertSame($expected, $legacy);
}