Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
52 commits
Select commit Hold shift + click to select a range
7656632
upgrade: Laravel 10.48 → 13.13 (PHP 8.3) & post-upgrade fixes
pandigresik Jun 4, 2026
2f42982
perbaiki github action
pandigresik Jun 4, 2026
08df655
perbaikan csp
pandigresik Jun 4, 2026
c99fcd9
perbaikan test
pandigresik Jun 4, 2026
06e914b
perbaikan nama route kembar
pandigresik Jun 4, 2026
e53056b
ubah minimum php menjadi 8.4
pandigresik Jun 4, 2026
d19f80d
perbaikan unsafe-eval di CSP
pandigresik Jun 4, 2026
be443e1
perbaikan test dan struktur baru laravel 13
pandigresik Jun 5, 2026
285df57
perbaikan test dan struktur baru laravel 13
pandigresik Jun 5, 2026
bf3c195
Merge branch 'upgrade/laravel-13' of github.com:OpenSID/OpenKab into …
pandigresik Jun 5, 2026
6177e34
perbaiki test
pandigresik Jun 5, 2026
7829010
verbose test
pandigresik Jun 5, 2026
69a51da
perbaikan test
pandigresik Jun 5, 2026
513b27a
perbaikan test
pandigresik Jun 5, 2026
9361783
perbaikan install awal
pandigresik Jun 5, 2026
3d29896
sesuaikan dengan struktur laravel 13
pandigresik Jun 5, 2026
4d93a5d
sesuaikan dengan struktur laravel 13
pandigresik Jun 5, 2026
a593ee8
Merge branch 'upgrade/laravel-13' of github.com:OpenSID/OpenKab into …
pandigresik Jun 5, 2026
02d47a9
kembalikan
pandigresik Jun 5, 2026
9a0abb5
sesuaikan standart struktur file dan folder laravel 13
pandigresik Jun 6, 2026
bdc47d6
perbaikan observer
pandigresik Jun 8, 2026
e321f36
perbaikan observer
pandigresik Jun 8, 2026
1b8bf1b
Merge branch 'upgrade/laravel-13' of github.com:OpenSID/OpenKab into …
pandigresik Jun 8, 2026
301ebba
sesuaikan
pandigresik Jun 8, 2026
712f2e8
Merge remote-tracking branch 'origin/rilis-dev' into upgrade/laravel-13
pandigresik Jun 9, 2026
c242bc4
inisialisasi smoke test
pandigresik Jun 10, 2026
d9ae00e
perbaikan test
pandigresik Jun 10, 2026
5406201
buat mock server
pandigresik Jun 10, 2026
09ca479
perbaikan menu tidak tampil dan rule csp
pandigresik Jun 10, 2026
9909943
perbaikan sitemap
pandigresik Jun 10, 2026
10e7b23
Merge branch 'upgrade/laravel-13' into feat/smoketest
pandigresik Jun 10, 2026
0826be5
update test
pandigresik Jun 10, 2026
6b6d8d2
update test
pandigresik Jun 10, 2026
6e92d61
update smoke test
pandigresik Jun 11, 2026
5518c13
perbaikan test , bandingkan dengan data fixture
pandigresik Jun 11, 2026
555effd
perbaikan test yang gagal
pandigresik Jun 12, 2026
e79a2e0
simpan dulu
pandigresik Jun 12, 2026
1e52f09
perbaikan test
pandigresik Jun 12, 2026
ce495c4
update test CI
pandigresik Jun 12, 2026
592de5f
install depedency playwright
pandigresik Jun 12, 2026
d1de79c
exclude testsuite Browser karena sangat berat
pandigresik Jun 12, 2026
da68b95
kembalikan lagi
pandigresik Jun 12, 2026
66f9d90
Merge branch 'feat/smoketest' into feat/smoketest-kependudukan
pandigresik Jun 12, 2026
166ab49
gunakan testid sebagai selector
pandigresik Jun 12, 2026
31062c3
Merge remote-tracking branch 'origin/rilis-dev' into feat/smoketest
pandigresik Jun 14, 2026
e147282
Merge branch 'feat/smoketest' into feat/smoketest-kependudukan
pandigresik Jun 14, 2026
3fe68cb
Feat: Smoketest untuk statistik kependudukan
pandigresik Jun 15, 2026
7bc43ad
smoketest datapresisi
pandigresik Jun 15, 2026
4fc9934
perbaikan test
pandigresik Jun 15, 2026
331d1ef
kembalikan
pandigresik Jun 15, 2026
c37c904
smoke test data presisi
pandigresik Jun 17, 2026
f87c7e2
feat: smoketest SOTK
pandigresik Jun 17, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,12 @@ jobs:

- name: Install Dependencies
run: composer install -q --no-ansi --no-interaction --no-scripts --no-progress --prefer-dist

- name: Install Node.js Dependencies
run: npm install

- name: Install Playwright Browsers
run: npm install playwright && npx playwright install

- name: Directory Permissions
run: chmod -R 777 storage bootstrap/cache
Expand All @@ -58,5 +64,6 @@ jobs:
DB_DATABASE: testing_db
DB_USERNAME: root
DB_PASSWORD: secret
APP_ENV: testing

run: php artisan migrate && php artisan test
run: php artisan migrate && php artisan test --testsuite=Unit,Feature
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
/storage/*.key
/vendor
.env
.env.testing
.env.backup
.env.production
.phpunit.result.cache
Expand All @@ -27,3 +28,8 @@ package-lock.json
.env.e2e
/template_ai/
AGENTS.md

# Pest Browser Testing
tests/Browser/Screenshots/
tests/Browser/screenshots/
tests/Browser/.session_state.json
15 changes: 9 additions & 6 deletions app/Http/Controllers/Auth/LoginController.php
Original file line number Diff line number Diff line change
Expand Up @@ -147,14 +147,17 @@ protected function attemptLogin(Request $request)

if ($successLogin) {
try {
$passwordRule = Password::min(8)
->letters()
->mixedCase()
->numbers()
->symbols();

$passwordRule->uncompromised();

$request->validate(['password' => [
'required',
Password::min(8)
->letters()
->mixedCase()
->numbers()
->symbols()
->uncompromised(),
$passwordRule,
]]);
session(['weak_password' => false]);
} catch (ValidationException $th) {
Expand Down
60 changes: 31 additions & 29 deletions app/Listeners/LoginListener.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,40 +33,42 @@ public function __construct(Request $request)
public function handle(Login $event)
{
$presisiStatus = false;
try {
$url = config('app.databaseGabunganUrl').'/api/v1/setting-modul';
$setting = Setting::where('key', 'database_gabungan_api_key')->first();
$settingModul = Http::withHeaders([
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Authorization' => 'Bearer '.$setting->value ?? '',
])->get($url, [
'filter[slug]' => 'data-presisi',
'page[size]' => 1,
])->throw()
->json();
$prodeskelStatus = false;

$prodeskel = Http::withHeaders([
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Authorization' => 'Bearer '.$setting->value ?? '',
])->get($url, [
'filter[slug]' => 'prodeskel',
'page[size]' => 1,
])->throw()
->json();
if (!app()->environment('testing')) {
try {
$url = config('app.databaseGabunganUrl').'/api/v1/setting-modul';
$setting = Setting::where('key', 'database_gabungan_api_key')->first();
$settingModul = Http::withHeaders([
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Authorization' => 'Bearer '.$setting->value ?? '',
])->get($url, [
'filter[slug]' => 'data-presisi',
'page[size]' => 1,
])->throw()
->json();

// Assuming the response contains a 'data' key with the status
$presisiStatus = count($settingModul['data']) > 0 ? true : false;
$prodeskelStatus = count($prodeskel['data']) > 0 ? true : false;
$prodeskel = Http::withHeaders([
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Authorization' => 'Bearer '.$setting->value ?? '',
])->get($url, [
'filter[slug]' => 'prodeskel',
'page[size]' => 1,
])->throw()
->json();

session(['presisi_enabled' => $presisiStatus, 'prodeskel_enabled' => $prodeskelStatus]);
$presisiStatus = count($settingModul['data']) > 0 ? true : false;
$prodeskelStatus = count($prodeskel['data']) > 0 ? true : false;

activity('authentication-log')->event('login')->withProperties($this->request)->log('Login');
} catch (Exception $e) {
Log::error('Error fetching setting-modul: '.$e->getMessage());
session(['presisi_enabled' => $presisiStatus, 'prodeskel_enabled' => $prodeskelStatus]);
} catch (Exception $e) {
Log::error('Error fetching setting-modul: '.$e->getMessage());
}
}
session(['presisi_enabled' => $presisiStatus, 'kabupaten.kode_kabupaten' => auth()->user()->kode_kabupaten ?? null]);

session(['presisi_enabled' => $presisiStatus, 'prodeskel_enabled' => $prodeskelStatus, 'kabupaten.kode_kabupaten' => auth()->user()->kode_kabupaten ?? null]);

activity('authentication-log')->event('login')->withProperties($this->request)->log('Login');
}
Expand Down
2 changes: 2 additions & 0 deletions app/Models/Department.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,13 @@

namespace App\Models;

use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\SoftDeletes;
use Kalnoy\Nestedset\NodeTrait;

class Department extends OpenKabModel
{
use HasFactory;
use SoftDeletes;
use NodeTrait;

Expand Down
2 changes: 2 additions & 0 deletions app/Models/Employee.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,12 @@

namespace App\Models;

use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\SoftDeletes;

class Employee extends OpenKabModel
{
use HasFactory;
use SoftDeletes;

public $table = 'employees';
Expand Down
2 changes: 2 additions & 0 deletions app/Models/Position.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,13 @@

namespace App\Models;

use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\SoftDeletes;
use Kalnoy\Nestedset\NodeTrait;

class Position extends OpenKabModel
{
use HasFactory;
use SoftDeletes;
use NodeTrait;

Expand Down
44 changes: 22 additions & 22 deletions app/Providers/AppServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,30 +42,30 @@ public function boot(): void
$this->addValidation();
$this->addLogQuery();

// Share data ke semua view (termasuk Pest browser test context)
$identitasAplikasi = fractal(
Identitas::first(),
IdentitasTransformer::class,
\League\Fractal\Serializer\JsonApiSerializer::class
)->toArray()['data']['attributes'];

$settingAplikasi = collect(
fractal(
Setting::all(),
SettingTransformer::class,
\League\Fractal\Serializer\JsonApiSerializer::class
)->toArray()['data']
)->pluck('attributes.value', 'attributes.key');

View::share('identitasAplikasi', $identitasAplikasi);
View::share('settingAplikasi', $settingAplikasi);
config()->set(['app.sebutanDesa' => $identitasAplikasi['sebutan_desa'] ?? 'Desa']);
config()->set(['app.sebutanKab' => $identitasAplikasi['sebutan_kab'] ?? 'Kabupaten']);
config()->set(['app.kodeKabupatenApi' => $identitasAplikasi['kode_kabupaten_api'] ?? '']);
$this->bootConfigAdminLTE($identitasAplikasi, $settingAplikasi);

if (App::runningInConsole()) {
activity()->disableLogging();
} else {
$identitasAplikasi = fractal(
Identitas::first(),
IdentitasTransformer::class,
\League\Fractal\Serializer\JsonApiSerializer::class
)->toArray()['data']['attributes'];

$settingAplikasi = collect(
fractal(
Setting::all(),
SettingTransformer::class,
\League\Fractal\Serializer\JsonApiSerializer::class
)->toArray()['data']
)->pluck('attributes.value', 'attributes.key');

// daftarkan data identitas aplikasi disini, karena akan dipakai di hampir semua view
View::share('identitasAplikasi', $identitasAplikasi);
View::share('settingAplikasi', $settingAplikasi);
config()->set(['app.sebutanDesa' => $identitasAplikasi['sebutan_desa'] ?? 'Desa']);
config()->set(['app.sebutanKab' => $identitasAplikasi['sebutan_kab'] ?? 'Kabupaten']);
config()->set(['app.kodeKabupatenApi' => $identitasAplikasi['kode_kabupaten_api'] ?? '']);
$this->bootConfigAdminLTE($identitasAplikasi, $settingAplikasi);
}
}

Expand Down
11 changes: 9 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,9 @@
"laravel/sail": "^1.26",
"mockery/mockery": "^1.4.4",
"nunomaduro/collision": "^8.1",
"phpunit/phpunit": "^11.0",
"pestphp/pest": "^4.0",
"pestphp/pest-plugin-browser": "^4.0",
"phpunit/phpunit": "^12.0",
"spatie/laravel-ignition": "^2.0"
},
"minimum-stability": "stable",
Expand Down Expand Up @@ -90,8 +92,13 @@
}
},
"scripts": {
"post-install-cmd": [
"@php artisan package:discover --ansi",
"bash tests/Browser/apply-patch.sh"
],
"post-update-cmd": [
"@php artisan vendor:publish --tag=laravel-assets --ansi --force"
"@php artisan vendor:publish --tag=laravel-assets --ansi --force",
"bash tests/Browser/apply-patch.sh"
],
"post-autoload-dump": [
"Illuminate\\Foundation\\ComposerScripts::postAutoloadDump",
Expand Down
Loading
Loading