assertSame('simulator_fiscal_delta_20261021_test', $target->name); $this->assertSame(55441, (int) $target->port); config(['investor-path.enabled' => true, 'suitecrm.enabled' => false]); $this->actingAs(User::factory()->create(['email_verified_at' => now()])); $draft = json_decode(file_get_contents(getenv('IVA_G2J_INPUT') ?: base_path('outputs/iva-l1-g2-fundraising-20261024/calculated.json')), true, flags: JSON_THROW_ON_ERROR); $id = $this->postJson('/api/v1/simulation-drafts', ['personal_snapshot' => [], 'economic_snapshot' => $draft], ['Idempotency-Key' => (string) Str::uuid()])->assertCreated()->json('data.id'); $recovered = $this->getJson('/api/v1/simulation-drafts/'.$id)->assertOk()->json('data.economic_snapshot'); $this->assertSame($draft['modelo_a_snapshot'], $recovered['modelo_a_snapshot']); $book = json_decode($recovered['modelo_a_snapshot'], true)['salesOperations']['opportunity:319']; $this->assertCount(2, $book['result']['rows']); $this->assertSame('200.00', $book['result']['periods'][0]['fields']['07']); $this->assertSame('0.00', $book['result']['periods'][0]['fields']['05']); $this->assertSame(json_decode($draft['modelo_a_snapshot'], true)['salesOperations']['opportunity:310'], json_decode($recovered['modelo_a_snapshot'], true)['salesOperations']['opportunity:310']); $this->assertSame(json_decode($draft['modelo_a_snapshot'], true)['salesOperations']['opportunity:309'], json_decode($recovered['modelo_a_snapshot'], true)['salesOperations']['opportunity:309']); if (getenv('IVA_G2J_RECOVERED')) file_put_contents(getenv('IVA_G2J_RECOVERED'), json_encode($recovered, JSON_THROW_ON_ERROR | JSON_UNESCAPED_UNICODE)); } }