Modul-Konfigurationsmatrix und Auswirkungs-Abgleich im Kanalkonfigurator
Deploy FeWo mit PipelineManager / deploy (push) Successful in 6m16s
Deploy FeWo mit PipelineManager / deploy (push) Successful in 6m16s
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
a3ab1b6657
commit
381720763c
6 files changed
+327
No files matched your search
@@ -14,6 +14,7 @@
|
||||
use App\Process\Capability;
|
||||
use App\Process\ChannelCapabilities;
|
||||
use App\Process\ChannelProcessConfiguration;
|
||||
use App\Process\ConfigurationImpact;
|
||||
use App\Process\ProcessProfile;
|
||||
use Carbon\CarbonImmutable;
|
||||
use Database\Seeders\PropertySeeder;
|
||||
@@ -211,6 +212,32 @@ public function test_a_confirmed_switch_does_not_touch_running_cases_or_other_ch
|
||||
$this->assertSame(['hold_hours' => 24], array_intersect_key($ds->fresh()->process_overrides['inquiry'], ['hold_hours' => 1]), 'the other intake kind is untouched');
|
||||
}
|
||||
|
||||
/** Switching a step off never drops the duty it served: the impact names dependants, what stays and the admissible ways. */
|
||||
public function test_switching_off_the_data_request_shows_what_stays_and_the_alternatives_without_changing_anything(): void
|
||||
{
|
||||
$ds = $this->channel('Destination Solution', []);
|
||||
$impact = app(ConfigurationImpact::class);
|
||||
|
||||
$this->assertSame([], $impact->of($ds, IntakeKind::Booking, ['model' => 'a3.portal_booking']), 'nothing switched off, nothing to report');
|
||||
|
||||
$draft = ['model' => 'a3.portal_booking', 'steps' => ['guest.data_request' => ['on' => false]]];
|
||||
$result = collect($impact->of($ds, IntakeKind::Booking, $draft))->firstWhere('module', 'guest.data_request');
|
||||
|
||||
$this->assertTrue($result['valid']);
|
||||
$this->assertSame([], $result['affected'], 'no step of this model waits for the data request: they carry on');
|
||||
$this->assertContains('von Ihnen von Hand', $result['alternatives'], 'the admissible ways to obtain the data remain offered');
|
||||
$this->assertStringContainsString('Es wird nichts anderes automatisch geändert', $result['suggestion']);
|
||||
$this->assertSame([], app(ChannelProcessConfiguration::class)->problems($ds, IntakeKind::Booking, $draft), 'the combination is valid');
|
||||
|
||||
$mandatory = collect($impact->of($ds, IntakeKind::Booking, ['model' => 'a3.portal_booking', 'steps' => ['documents.send' => ['on' => false]]]))->firstWhere('module', 'documents.send');
|
||||
$this->assertFalse($mandatory['valid']);
|
||||
$this->assertStringContainsString('Pflicht', $mandatory['suggestion']);
|
||||
|
||||
$dependants = collect($impact->of($ds, IntakeKind::Booking, ['model' => 'a3.portal_booking', 'steps' => ['portal.confirmation' => ['on' => false]]]))->firstWhere('module', 'portal.confirmation');
|
||||
$this->assertContains('Buchungsunterlagen (Vertragsdokumentation)', $dependants['affected'], 'the documents depend hard on the confirmation step');
|
||||
$this->assertNotEmpty($dependants['remains']);
|
||||
}
|
||||
|
||||
public function test_unknown_capabilities_block_nothing_but_ask_for_confirmation(): void
|
||||
{
|
||||
$generic = $this->channel('Irgendein Portal', []);
|
||||
|
||||
Reference in new issue
Block a user