fix: complete InvesteMoz validation and error corrections

This commit is contained in:
2026-10-29 21:47:33 +02:00
parent 63147312e2
commit daf8623441
718 changed files with 127308 additions and 20959 deletions
+8
View File
@@ -3,6 +3,7 @@
namespace Tests\Feature;
use App\Models\User;
use Database\Seeders\TerritoryReferenceSeeder;
use Illuminate\Foundation\Testing\RefreshDatabase;
use Illuminate\Support\Facades\Crypt;
use Illuminate\Support\Facades\DB;
@@ -21,6 +22,8 @@ class PortalAuditRoutesTest extends TestCase
$this->assertStringEndsWith('_test', $identity->database);
$this->assertSame(55441, (int) $identity->port);
Http::fake();
$this->seed(TerritoryReferenceSeeder::class);
DB::statement("SET LOCAL statement_timeout = '20s'");
$investor = User::factory()->create();
$manager = User::factory()->create();
$reviewer = User::factory()->create();
@@ -50,6 +53,11 @@ class PortalAuditRoutesTest extends TestCase
}
$response = $this->get($url);
$results[] = ['profile' => $profile, 'route' => $url, 'status' => $response->status(), 'coverage' => 'HTTP GET, schema migrated and empty QA; not visual acceptance'];
if ($url === '/management/territory-geometry-import' && in_array($profile, ['manager', 'designated_mfa_qa'], true) && ! config('geometry-import.enabled')) {
$response->assertStatus(503); // The disabled import explicitly reports unavailability.
continue;
}
if ($response->status() >= 500) {
$failures[] = $profile.' '.$url.' HTTP '.$response->status();
}