fix: complete InvesteMoz validation and error corrections
This commit is contained in:
@@ -92,7 +92,14 @@ class PrivateInvestmentPreparationTest extends TestCase
|
||||
$this->assertSame('associated', collect($view['private_investment']['requirements'])->firstWhere('key', 'lease')['state']);
|
||||
$this->assertLessThan(20000, mb_strlen($view['prefill']['simulator']['context_applicability_snapshot']));
|
||||
$this->assertArrayNotHasKey('investment_preparation', $view['prefill']['simulator']);
|
||||
$personalKeys = ['person_type', 'investor_origin', 'tax_residency_country', 'fiscal_residency_country', 'entity_stage'];
|
||||
$personalKeys = ['email', 'phone', 'person_type', 'investor_origin', 'tax_residency_country', 'fiscal_residency_country', 'entity_stage'];
|
||||
// The browser stores presentation labels in selection_labels, never as snapshot fields.
|
||||
foreach (array_keys($view['prefill']['simulator']) as $field) {
|
||||
if (str_ends_with($field, '_label')) {
|
||||
$view['prefill']['simulator']['selection_labels'][substr($field, 0, -6)] = $view['prefill']['simulator'][$field];
|
||||
unset($view['prefill']['simulator'][$field]);
|
||||
}
|
||||
}
|
||||
$this->postJson('/api/v1/simulation-drafts', ['context' => $id, 'personal_snapshot' => Arr::only($view['prefill']['simulator'], $personalKeys), 'economic_snapshot' => ['purpose' => 'simulate_only', ...Arr::except($view['prefill']['simulator'], $personalKeys)]], ['Idempotency-Key' => (string) Str::uuid()])->assertCreated();
|
||||
$plan = $this->save($id, ['project_concession' => 'yes', 'implementation_mode' => 'foreign_representation', 'site_tenure' => 'duat']);
|
||||
$this->assertFalse($plan['calculation_inputs_changed'], 'Procedural changes do not change the inputs of the existing IVA calculation.');
|
||||
|
||||
Reference in New Issue
Block a user