merge: retain installed funding correction alongside isolated sector QA

This commit is contained in:
2026-11-15 20:32:04 +02:00
13 changed files with 858 additions and 764 deletions
@@ -68,6 +68,17 @@ final class FundingCriteriaCoherenceTest extends TestCase
$this->getJson('/api/v1/investment/territory-options?type=district&parent_id='.$this->geo['province'])->assertOk()->assertJsonCount(1, 'data');
}
public function test_physical_search_defaults_to_documented_presence_but_preserves_explicit_unknown_choice(): void
{
$local = $this->publish('qa-local');
$this->publish('qa-unlocated', overrides: ['locations' => []]);
$filters = ['q' => 'SYNTHETIC qa-', 'location_mode' => 'physical', 'territory' => $this->geo['province']];
$this->get('/fundos?'.http_build_query($filters))->assertOk()->assertInertia(fn ($page) => $page
->where('filters.certainty', 'documented')->has('items.data', 1)->where('items.data.0.id', $local));
$this->get('/fundos?'.http_build_query([...$filters, 'certainty' => 'include_unknown']))->assertOk()->assertInertia(fn ($page) => $page
->where('filters.certainty', 'include_unknown')->has('items.data', 2));
}
public function test_contradictory_type_or_record_kind_and_incomplete_hierarchy_are_rejected(): void
{
foreach ([['category' => 'banking', 'institution_type' => 'broker'], ['category' => 'banking', 'institution_type' => 'commercial_bank', 'kind' => 'fund', 'location_mode' => 'physical'], ['district_id' => $this->geo['district']]] as $filters) {