Anfrage-Basisprozess inquiry.request mit Schablonen für Antwort und Gastkommunikation
Antwortart (Auskunft/Angebot) und Reservierung sind entkoppelt (neue Einstellung inquiry_answer; pre_reservation bleibt die Reservierungsstrategie). Anlass-bezogene Absender für Anreise-Information und Bewertungsbitte; Schablonen liefern Standardwerte unterhalb aller einstellbaren Ebenen. A1/A2 bleiben Voreinstellungen und Altfassungen. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
e40f8639b3
commit
221ce8ca81
51 files changed
+773
-73
No files matched your search
@@ -71,12 +71,12 @@ public function test_only_admissible_models_per_channel_and_intake_are_offered()
|
||||
$listing = $this->channel('Ostseeklar', 'inquiry');
|
||||
$website = Channel::websiteOf($this->property);
|
||||
|
||||
$this->assertSame(['a2.offer', 'a2.information'], array_keys($configuration->admissibleModels($fewo, IntakeKind::Inquiry)));
|
||||
$this->assertSame(['a2.offer', 'a2.information', 'inquiry.request'], array_keys($configuration->admissibleModels($fewo, IntakeKind::Inquiry)));
|
||||
$this->assertSame(['a4.portal_booking', 'external.booking'], array_keys($configuration->admissibleModels($fewo, IntakeKind::Booking)), 'O2: of the archetypes only A4 fits FeWo-direkt; the base process is open and restricts per template');
|
||||
$this->assertSame(['a3.portal_booking', 'external.booking'], array_keys($configuration->admissibleModels($ds, IntakeKind::Booking)));
|
||||
$this->assertSame([IntakeKind::Booking], $configuration->intakes($ds));
|
||||
$this->assertSame(['a2.offer', 'a2.information'], array_keys($configuration->admissibleModels($listing, IntakeKind::Inquiry)));
|
||||
$this->assertSame(['a1.offer', 'a1.information'], array_keys($configuration->admissibleModels($website, IntakeKind::Inquiry)));
|
||||
$this->assertSame(['a2.offer', 'a2.information', 'inquiry.request'], array_keys($configuration->admissibleModels($listing, IntakeKind::Inquiry)));
|
||||
$this->assertSame(['a1.offer', 'a1.information', 'inquiry.request'], array_keys($configuration->admissibleModels($website, IntakeKind::Inquiry)));
|
||||
|
||||
// The restriction lives in the channel profile, not in the process core: a changed profile releases more models.
|
||||
$fewo->update(['settings' => [...(array) $fewo->settings, 'portal_profile' => 'generic']]);
|
||||
|
||||
@@ -45,7 +45,7 @@ public function test_case_h_an_optional_address_check_is_added_at_an_extension_p
|
||||
$catalogue = app(ProcessCatalogue::class);
|
||||
$using = array_keys(array_filter($catalogue->models(), fn ($model): bool => collect($model->variants())->contains(fn ($variant): bool => in_array('guest.address_check', $model->modules($variant->key), true))));
|
||||
|
||||
$this->assertSame(['a1.offer'], $using);
|
||||
$this->assertSame(['a1.offer', 'inquiry.request'], $using, 'the former offer model and the request base process that replaces it');
|
||||
$this->assertSame([], $catalogue->problems());
|
||||
foreach ($catalogue->models() as $key => $model) {
|
||||
$this->assertNotContains('guest.address_check', $model->modules('standard'), "{$key}: standard course unchanged");
|
||||
|
||||
@@ -119,7 +119,7 @@ public function test_loyalty_cannot_reach_a_real_case_and_leaves_the_other_model
|
||||
$catalogue = app(ProcessCatalogue::class);
|
||||
$using = array_keys(array_filter($catalogue->models(), fn ($model): bool => collect($model->variants())->contains(fn ($variant): bool => in_array('pricing.loyalty_discount', $model->modules($variant->key), true))));
|
||||
|
||||
$this->assertSame(['a1.offer'], $using, 'only the A1 offer model has the variant');
|
||||
$this->assertSame(['a1.offer', 'inquiry.request'], $using, 'only the A1 offer model and the request base process have the variant');
|
||||
$this->assertSame([], $catalogue->problems());
|
||||
foreach ($catalogue->models() as $key => $model) {
|
||||
$this->assertNotContains('guest.loyalty_status', $model->modules('standard'), "{$key}: standard course unchanged");
|
||||
|
||||
@@ -100,7 +100,7 @@ public function test_every_combination_is_composed_into_a_valid_versioned_plan(s
|
||||
$plan = ProcessPlan::of($booking);
|
||||
|
||||
$this->assertSame(['external.booking', 1], [$plan->model, $plan->modelVersion]);
|
||||
$this->assertEquals(['collection' => $collection.'@1', 'contract_documents' => $documents.'@1'], $plan->templates);
|
||||
$this->assertEquals(['collection' => $collection.'@1', 'contract_documents' => $documents.'@1', 'guest_communication' => 'guest_comm.own@1'], $plan->templates);
|
||||
$this->assertSame($payout, array_key_exists('portal.payout', $plan->modules));
|
||||
$this->assertArrayHasKey('payments.monitor', $plan->modules);
|
||||
$this->assertArrayHasKey('documents.send', $plan->modules);
|
||||
@@ -263,7 +263,7 @@ public function test_the_base_process_cannot_be_saved_with_templates_the_portal_
|
||||
$this->assertNull(($channel->fresh()->process_overrides ?? [])['booking'] ?? null, 'nothing saved');
|
||||
|
||||
$configure->handle($channel, IntakeKind::Booking, [...$draft, 'templates' => ['collection' => 'collection.portal', 'contract_documents' => 'contract_docs.own']]);
|
||||
$this->assertEquals(['collection' => 'collection.portal', 'contract_documents' => 'contract_docs.own'], $channel->fresh()->process_overrides['booking']['templates']);
|
||||
$this->assertEquals(['collection' => 'collection.portal', 'contract_documents' => 'contract_docs.own', 'guest_communication' => 'guest_comm.own'], $channel->fresh()->process_overrides['booking']['templates']);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -87,10 +87,10 @@ public function test_an_archetype_moves_to_the_base_process_with_the_same_combin
|
||||
|
||||
$page->call('save')->assertNotified('Ablauf gespeichert');
|
||||
$this->assertSame('external.booking', $fewo->fresh()->process_overrides['booking']['model']);
|
||||
$this->assertEquals(['collection' => 'collection.portal', 'contract_documents' => 'contract_docs.own'], $fewo->fresh()->process_overrides['booking']['templates']);
|
||||
$this->assertEquals(['collection' => 'collection.portal', 'contract_documents' => 'contract_docs.own', 'guest_communication' => 'guest_comm.own'], $fewo->fresh()->process_overrides['booking']['templates']);
|
||||
|
||||
$booking = $this->takeOver($fewo->fresh(), 'FD-1');
|
||||
$this->assertEquals(['collection' => 'collection.portal@1', 'contract_documents' => 'contract_docs.own@1'], ProcessPlan::of($booking)->templates);
|
||||
$this->assertEquals(['collection' => 'collection.portal@1', 'contract_documents' => 'contract_docs.own@1', 'guest_communication' => 'guest_comm.own@1'], ProcessPlan::of($booking)->templates);
|
||||
$this->assertSame('A4', strtoupper($booking->case_type->value));
|
||||
}
|
||||
|
||||
@@ -146,7 +146,7 @@ public function test_switching_the_collection_template_shows_every_consequence_a
|
||||
$this->assertSame('manual', $saved['contract_delivery'], 'parameters of the kept modules survive');
|
||||
$this->assertSame(['review.request' => ['on' => false]], $saved['steps'], 'so does a switched-off optional step');
|
||||
$this->assertStringContainsString('Bisher eingestellt', $ds->fresh()->settings['process_history'][0]['removed_settings'][0]);
|
||||
$this->assertEquals(['collection' => 'collection.own', 'contract_documents' => 'contract_docs.own'], $saved['templates']);
|
||||
$this->assertEquals(['collection' => 'collection.own', 'contract_documents' => 'contract_docs.own', 'guest_communication' => 'guest_comm.own'], $saved['templates']);
|
||||
}
|
||||
|
||||
public function test_the_impact_of_a_template_change_names_modules_responsibility_and_open_ends(): void
|
||||
|
||||
@@ -71,10 +71,12 @@ public function test_every_combination_runs_in_the_tester_and_differs_as_its_tem
|
||||
$this->assertNull($report['aborted'] ?? null, json_encode($report));
|
||||
$this->assertSame([], $report['violations']);
|
||||
$this->assertSame(['external.booking', 1], [$report['plan']['model'], $report['plan']['version']]);
|
||||
$this->assertEqualsCanonicalizing([$collection.'@1', $documents.'@1'], array_column($report['plan']['templates'], 'reference'), 'the report names the templates used');
|
||||
$this->assertEqualsCanonicalizing([$collection.'@1', $documents.'@1', 'guest_comm.own@1'], array_column($report['plan']['templates'], 'reference'), 'the report names the templates used');
|
||||
foreach ($report['plan']['templates'] as $template) {
|
||||
$this->assertNotEmpty($template['modules']);
|
||||
$this->assertFalse($template['capabilities'][0]['confirmed'], 'a capability nobody confirmed is not shown as proven');
|
||||
foreach ($template['capabilities'] as $capability) {
|
||||
$this->assertFalse($capability['confirmed'], 'a capability nobody confirmed is not shown as proven');
|
||||
}
|
||||
}
|
||||
|
||||
[$known, , $confirmed] = $report['timeline'];
|
||||
|
||||
Reference in new issue
Block a user