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
@@ -19,7 +19,8 @@ final class CorridorAgribusinessBatchTest extends TestCase
$target = DB::selectOne('select current_database() as name, inet_server_port() as port');
$this->assertSame('simulator_fiscal_delta_20261021_test', $target->name);
$this->assertSame(55441, (int) $target->port);
$this->withoutVite(); config(['portal.profile_access_enabled' => true]);
$this->withoutVite();
config(['portal.profile_access_enabled' => true]);
$entries = app(CorridorAgribusinessOpportunities::class)->entries();
$keys = array_column($entries, 'key');
$others = Opportunity::withTrashed()->whereNotIn('management_creation_key', $keys)->orWhereNull('management_creation_key')->orderBy('id')->get()->map(fn ($r) => $r->getRawOriginal())->all();
@@ -35,7 +36,8 @@ final class CorridorAgribusinessBatchTest extends TestCase
$this->assertCount(34, $previews);
$input = ['confirm' => true, 'reason' => 'QA: divulgação das fichas expressamente seleccionadas no lote de Agronegócio.',
'previews' => array_map(fn ($p) => ['id' => $p['id'], 'token' => $p['token'], 'operation_key' => (string) Str::uuid()], $previews)];
$bad = $input; array_pop($bad['previews']);
$bad = $input;
array_pop($bad['previews']);
$this->postJson($base.'/divulgar', $bad)->assertUnprocessable();
$this->postJson($base.'/divulgar', $input)->assertOk();
$this->postJson($base.'/divulgar', $input)->assertOk();