Immobilien site 11-05-2026
This commit is contained in:
parent
e198d842ce
commit
6799325f71
28 changed files with 16189 additions and 809 deletions
|
|
@ -99,6 +99,28 @@ it('immobilien contact form renders with privacy checkbox', function () {
|
|||
->assertSee('Exposé');
|
||||
});
|
||||
|
||||
it('immobilien contact form can hide interest selection', function () {
|
||||
Livewire::test(ImmobilienContactForm::class, [
|
||||
'projectSlug' => 'test-projekt',
|
||||
'projectTitle' => 'Testprojekt Dubai',
|
||||
'interestOptions' => ['kauf' => 'Kauf', 'miete' => 'Miete'],
|
||||
'showInterest' => false,
|
||||
'submitLabel' => 'Anfrage absenden',
|
||||
'syncFromAlpineProject' => true,
|
||||
])
|
||||
->assertDontSee('Bitte wählen')
|
||||
->assertDontSee('Kauf')
|
||||
->assertSee('Anfrage absenden')
|
||||
->assertSee('Datenschutzerklärung');
|
||||
});
|
||||
|
||||
it('immobilien contact form updates selected project from modal event', function () {
|
||||
Livewire::test(ImmobilienContactForm::class)
|
||||
->dispatch('azizi-project-selected', slug: 'azizi-amir', title: 'Azizi Amir')
|
||||
->assertSet('projectSlug', 'azizi-amir')
|
||||
->assertSet('projectTitle', 'Azizi Amir');
|
||||
});
|
||||
|
||||
it('immobilien contact form validates required fields', function () {
|
||||
Livewire::test(ImmobilienContactForm::class)
|
||||
->call('submit')
|
||||
|
|
@ -119,7 +141,17 @@ it('immobilien contact form sends inquiry on valid submission', function () {
|
|||
Mail::fake();
|
||||
|
||||
$service = $this->mock(ContactFormService::class);
|
||||
$service->shouldReceive('handle')->once();
|
||||
$service
|
||||
->shouldReceive('handle')
|
||||
->once()
|
||||
->withArgs(function (array $payload, string $subject, string $source): bool {
|
||||
expect($payload['project'])->toBe('azizi-creek-views-4')
|
||||
->and($payload['project_title'])->toBe('Creek Views 4')
|
||||
->and($subject)->toBe('Immobilien-Anfrage: Creek Views 4')
|
||||
->and($source)->toBe('immobilien-contact-form');
|
||||
|
||||
return true;
|
||||
});
|
||||
|
||||
Livewire::test(ImmobilienContactForm::class, [
|
||||
'projectSlug' => 'azizi-creek-views-4',
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue