fix: keep opportunity preparation focused on the pending selection
tests / ci (push) Canceled after 0s
tests / ci (push) Canceled after 0s
This commit is contained in:
@@ -33,6 +33,20 @@ final class InvestmentOpportunityChoicesTest extends TestCase
|
||||
return $this->postJson('/investimentos', ['title' => 'QA: investimento conjunto', 'client_key' => (string) Str::uuid(), 'reuse_consent' => true])->assertCreated()->json('id');
|
||||
}
|
||||
|
||||
public function test_edit_recovers_requested_opportunity_without_presenting_it_as_already_saved(): void
|
||||
{
|
||||
$record = Opportunity::where('management_creation_key', app(CorridorAgribusinessOpportunities::class)->entries()[0]['key'])->firstOrFail();
|
||||
$id = $this->dossier();
|
||||
$before = $this->getJson('/investimentos/'.$id.'/contexto')->assertOk()->json('context');
|
||||
$this->get('/investimentos/'.$id.'/contexto/editar?source=opportunity:'.$record->id)->assertOk()
|
||||
->assertInertia(fn (\Inertia\Testing\AssertableInertia $page) => $page->component('investor-path/context')
|
||||
->where('source.key', 'opportunity:'.$record->id)
|
||||
->where('requestedChoices.0.opportunity.key', 'opportunity:'.$record->id)
|
||||
->where('requestedChoices.0.opportunity.title', $record->title));
|
||||
$after = $this->getJson('/investimentos/'.$id.'/contexto')->assertOk()->json('context');
|
||||
$this->assertSame($before, $after);
|
||||
}
|
||||
|
||||
public function test_multiple_opportunities_keep_sites_sources_requirements_and_results_in_one_dossier(): void
|
||||
{
|
||||
$entries = array_slice(app(CorridorAgribusinessOpportunities::class)->entries(), 0, 2);
|
||||
|
||||
Reference in New Issue
Block a user