[Superuser] Perbaikan Halaman Akses Superuser
This commit is contained in:
@@ -65,10 +65,14 @@ class LegacyKurikulumTest extends TestCase
|
||||
'2020 IF313 Kecerdasan Buatan 3 Kuliah S1 - Teknik Informatika MKP –',
|
||||
'2020 IF314 Jaringan Lanjut 2 Kuliah S1 - Teknik Informatika MKWU –',
|
||||
'2020 IF315 Kerja Praktik 4 Praktik Lapangan S1 - Teknik Informatika – –',
|
||||
], $rows(), 'Terbaru dulu, lalu semester dan kode; MK prodi lain tidak ikut.');
|
||||
], $rows(['tahun' => '']), 'Terbaru dulu, lalu semester dan kode; MK prodi lain tidak ikut.');
|
||||
// Bawaan: tahun periode aktif prodi akun (368 = 2020/2021 → 2020); filter dikosongkan (tahun=) = semua tahun.
|
||||
$this->assertSame('2020', $this->dom($response)->query("//select[@name='filter_tahun']/option[@selected]")->item(0)?->getAttribute('value'));
|
||||
$this->assertCount(5, $rows());
|
||||
$this->assertCount(5, $rows(['tahun' => '2020']));
|
||||
$this->assertSame(['2020 IF315 Kerja Praktik 4 Praktik Lapangan S1 - Teknik Informatika – –'], $rows(['tipe' => 1]));
|
||||
$this->assertCount(1, $rows(['prodi' => 22]));
|
||||
$this->assertCount(1, $rows(['prodi' => 22, 'tahun' => '']));
|
||||
$this->assertCount(0, $rows(['prodi' => 22]), 'MK Teknik Sipil berkurikulum 2021, di luar tahun bawaan.');
|
||||
$this->assertCount(2, $rows(['kelompok' => 'mkp']));
|
||||
$this->assertCount(1, $rows(['q' => 'basis']));
|
||||
$this->assertCount(6, $rows(['tahun' => 'x', 'tipe' => 9, 'prodi' => 99, 'kelompok' => '%']), 'Nilai filter tak dikenal diabaikan.');
|
||||
@@ -85,10 +89,13 @@ class LegacyKurikulumTest extends TestCase
|
||||
$this->assertSame(1, $this->dom($response)->query("//tbody//a[@aria-label='Lihat']")->length);
|
||||
|
||||
$rows = fn (array $q = []): array => array_map(fn (array $r): string => "{$r['kurikulum']} {$r['kode']} {$r['prodi']} {$r['wajib']}/{$r['pilihan']}/{$r['total']}", $this->data('operator.kurikulum.data', $q)->json('rows'));
|
||||
$this->assertSame(['2021 – Teknik Sipil 2/0/2', '2020 55201 S1 - Teknik Informatika 9/6/15'], $rows());
|
||||
$this->assertSame(['2020 55201 S1 - Teknik Informatika 9/6/15'], $rows(['jenjang' => 'S1']));
|
||||
// Bawaan: tahun periode aktif prodi akun (368 = 2020/2021 → 2020); filter dikosongkan (tahun=) = semua tahun.
|
||||
$this->assertSame('2020', $this->dom($response)->query("//select[@name='filter_tahun']/option[@selected]")->item(0)?->getAttribute('value'));
|
||||
$this->assertSame(['2020 55201 S1 - Teknik Informatika 9/6/15'], $rows());
|
||||
$this->assertSame(['2021 – Teknik Sipil 2/0/2', '2020 55201 S1 - Teknik Informatika 9/6/15'], $rows(['tahun' => '']));
|
||||
$this->assertSame(['2020 55201 S1 - Teknik Informatika 9/6/15'], $rows(['jenjang' => 'S1', 'tahun' => '']));
|
||||
$this->assertSame(['2021 – Teknik Sipil 2/0/2'], $rows(['tahun' => '2021']));
|
||||
$this->assertSame(['2021 – Teknik Sipil 2/0/2'], $rows(['q' => 'sipil']));
|
||||
$this->assertSame(['2021 – Teknik Sipil 2/0/2'], $rows(['q' => 'sipil', 'tahun' => '']));
|
||||
|
||||
$detail = $this->get(route('operator.kurikulum.show', 900))->assertOk()
|
||||
->assertSee('Kurikulum 2020')->assertSee('Kurikulum berbasis KKNI')->assertSee('2020/2021 Ganjil')->assertSee('Reguler A')
|
||||
@@ -110,6 +117,14 @@ class LegacyKurikulumTest extends TestCase
|
||||
|
||||
$groups = fn (array $q = []): array => array_map(fn (array $r): string => "{$r['grup']}: {$r['mk']}", $this->data('operator.grupmk.data', $q)->json('rows'));
|
||||
$this->assertSame(['GEO – Geoteknik: –', 'SI – Sistem Informasi: IF312 - Pemrograman Web, IF313 - Kecerdasan Buatan'], $groups());
|
||||
// Tabel hanya memuat jumlah anggota; rinciannya (anggota) untuk modal Lihat bersama kurikulum.
|
||||
$rows = $this->data('operator.grupmk.data')->json('rows');
|
||||
$this->assertSame([0, 2], array_column($rows, 'jumlah'));
|
||||
$this->assertSame([], $rows[0]['anggota']);
|
||||
$this->assertSame(['IF312 - Pemrograman Web (3 SKS, semester 3)', 'IF313 - Kecerdasan Buatan (3 SKS, semester 5)'], $rows[1]['anggota']);
|
||||
$this->assertSame('2020 – Kurikulum 2020', $rows[1]['kurikulum']);
|
||||
$this->assertSame(1, $this->dom($response)->query("//dialog//dl//ol[contains(@class, 'satu-detail__list')]")->length, 'Modal Lihat memuat daftar anggota.');
|
||||
$this->assertStringContainsString('Kurikulum', $this->textOf($this->dom($response)->query('//dialog//dl')->item(0)));
|
||||
$this->assertSame(['SI – Sistem Informasi: IF312 - Pemrograman Web, IF313 - Kecerdasan Buatan'], $groups(['kurikulum' => 900]));
|
||||
$this->assertSame(['SI – Sistem Informasi: IF312 - Pemrograman Web, IF313 - Kecerdasan Buatan'], $groups(['q' => 'kecerdasan']));
|
||||
$this->assertSame(['GEO – Geoteknik: –'], $groups(['grup' => 2]));
|
||||
|
||||
Reference in New Issue
Block a user