[Operator] Registrasi Akademik
This commit is contained in:
@@ -248,6 +248,38 @@ class LegacyLaporanTest extends TestCase
|
||||
$this->assertSame(['NIP', 'Dosen Wali', 'Home Base', 'Mahasiswa Bimbingan Aktif'], array_slice($waliRows[0], 0, 4));
|
||||
$this->assertSame(4, count(array_filter($waliRows[0], fn ($cell) => $cell !== null)));
|
||||
|
||||
// Daftar Mahasiswa: unduhan Excel, bukan CSV.
|
||||
$this->get(route('operator.halaman', 'repp_daftarmhs'))->assertOk()->assertSee('Unduh (Excel)')->assertDontSee('Unduh (CSV)');
|
||||
$mhs = DB::connection('untan')->table('t_mahasiswa')->whereNotNull('idangkatan')->whereNotNull('idprogdi')->first(['idprogdi', 'idangkatan']);
|
||||
$daftar = $this->get(route('operator.laporan.unduh', ['slug' => 'repp_daftarmhs', 'prodi' => $mhs->idprogdi, 'masuk' => $mhs->idangkatan]))->assertOk();
|
||||
$this->assertMatchesRegularExpression('/attachment; filename=repp_daftarmhs-\d{8}-\d{6}\.xlsx/', $daftar->headers->get('Content-Disposition'));
|
||||
@unlink($daftar->baseResponse->getFile()->getPathname());
|
||||
|
||||
// Seluruh grup Cetak Daftar Registrasi Mahasiswa: unduhan Excel, bukan CSV.
|
||||
foreach (['repp_masastudi', 'repp_statussemester', 'repp_statusmhs5thn', 'repp_statusmhs', 'repp_rekapmhsprodi', 'repp_rekapbiodata'] as $slug) {
|
||||
$this->get(route('operator.halaman', $slug))->assertOk()->assertSee('Unduh (Excel)')->assertDontSee('Unduh (CSV)');
|
||||
}
|
||||
|
||||
// KRS, Status KRS Mhs, dan Rekap KRS: unduhan Excel, bukan CSV.
|
||||
foreach (['repp_krsmahasiswa', 'repp_krsmhs', 'repp_rekapkrs'] as $slug) {
|
||||
$this->get(route('operator.halaman', $slug))->assertOk()->assertSee('Unduh (Excel)')->assertDontSee('Unduh (CSV)');
|
||||
$krs = $this->get(route('operator.laporan.unduh', ['slug' => $slug, 'periode' => DB::connection('untan')->table('t_periodekuliah')->value('idperiode')]))->assertOk();
|
||||
$this->assertMatchesRegularExpression('/attachment; filename='.$slug.'-\d{8}-\d{6}\.xlsx/', $krs->headers->get('Content-Disposition'));
|
||||
@unlink($krs->baseResponse->getFile()->getPathname());
|
||||
}
|
||||
|
||||
// Distribusi KRS Mahasiswa: unduhan Excel, bukan CSV.
|
||||
$this->get(route('operator.halaman', 'repp_distribusikrsmhs'))->assertOk()->assertSee('Unduh (Excel)')->assertDontSee('Unduh (CSV)');
|
||||
$sebaran = $this->get(route('operator.laporan.unduh', ['slug' => 'repp_distribusikrsmhs', 'periode' => DB::connection('untan')->table('t_periodekuliah')->value('idperiode')]))->assertOk();
|
||||
$this->assertMatchesRegularExpression('/attachment; filename=repp_distribusikrsmhs-\d{8}-\d{6}\.xlsx/', $sebaran->headers->get('Content-Disposition'));
|
||||
@unlink($sebaran->baseResponse->getFile()->getPathname());
|
||||
|
||||
// Mata Kuliah Mengulang: unduhan Excel, bukan CSV.
|
||||
$this->get(route('operator.halaman', 'repp_mkmengulang'))->assertOk()->assertSee('Unduh (Excel)')->assertDontSee('Unduh (CSV)');
|
||||
$ulang = $this->get(route('operator.laporan.unduh', ['slug' => 'repp_mkmengulang', 'periode' => DB::connection('untan')->table('t_periodekuliah')->value('idperiode')]))->assertOk();
|
||||
$this->assertMatchesRegularExpression('/attachment; filename=repp_mkmengulang-\d{8}-\d{6}\.xlsx/', $ulang->headers->get('Content-Disposition'));
|
||||
@unlink($ulang->baseResponse->getFile()->getPathname());
|
||||
|
||||
// Dosen Pembimbing: unduhan Excel (berkas .xlsx dengan nama repp_dpa), bukan CSV.
|
||||
$this->get(route('operator.halaman', 'repp_dpa'))->assertOk()->assertSee('Unduh (Excel)')->assertDontSee('Unduh (CSV)');
|
||||
$dpa = $this->get(route('operator.laporan.unduh', ['slug' => 'repp_dpa', 'bimbingan' => 'pa']))->assertOk();
|
||||
|
||||
Reference in New Issue
Block a user