oportunidades 7
tests / ci (push) Waiting to run

This commit is contained in:
2026-10-13 11:40:29 +02:00
parent 20971d523f
commit 287e991486
2902 changed files with 1085456 additions and 25957 deletions
+14
View File
@@ -14,6 +14,20 @@ class LandAssistanceTest extends TestCase
{
use RefreshDatabase;
public function test_filled_print_preserves_country_origin_and_private_ownership(): void
{
$owner = User::factory()->create(['email_verified_at' => now()]);
$this->actingAs($owner)->postJson('/investidor/terra-duat', ['payload' => ['full_name' => 'Pessoa sintética QA', 'country' => 'MZ', 'declared_origin_country_code' => 'PT']])->assertCreated();
$case = LandAssistanceCase::firstOrFail();
$this->actingAs($owner)->get('/investidor/terra-duat/'.$case->id.'/imprimir')
->assertOk()->assertInertia(fn (Assert $page) => $page->component('land-assistance/print')
->where('country.code', 'MZ')->where('declaredOrigin.code', 'PT')
->where('case.version', 1)->where('case.payload.country', 'MZ')->where('case.payload.declared_origin_country_code', 'PT'));
$this->actingAs(User::factory()->create(['email_verified_at' => now()]))
->get('/investidor/terra-duat/'.$case->id.'/imprimir')->assertNotFound();
$this->assertSame(1, $case->fresh()->version);
}
public function test_public_guide_and_blank_form_are_available_without_claiming_official_status(): void
{
$this->get('/terra-duat')->assertOk()->assertInertia(fn (Assert $page) => $page->component('land-assistance/guide'));