Hauptadresse statt Zweitadresse, Abspielgeschwindigkeit je Video
- Weitere Adressen einer Website (z. B. www.stommer.info) leiten per 301 auf die Hauptadresse um; vorher blockierte der Browser Skripte, Schriften und Videos, die von der Hauptadresse kamen (kein Titelvideo, Ersatzschrift) - Site::origin() nimmt verbindlich das Feld domain - Videos: Abspielgeschwindigkeit 0,5x bis 1x, gilt im Titelbereich und Rundgang Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
b5ff837dcd
commit
cc47cac93e
14 files changed
+113
-16
No files matched your search
@@ -56,7 +56,7 @@ public function test_a_landlord_created_by_the_operator_is_reachable_at_once():
|
||||
);
|
||||
|
||||
$this->get('http://duene.test/')->assertOk()->assertSee('Ferienhaus Düne');
|
||||
$this->get('http://www.duene.test/')->assertOk();
|
||||
$this->get('http://www.duene.test/')->assertRedirect('https://duene.test/');
|
||||
}
|
||||
|
||||
public function test_a_suspended_landlord_shows_a_notice_instead_of_a_dead_link(): void
|
||||
@@ -88,8 +88,9 @@ public function test_the_default_notice_applies_when_none_was_written(): void
|
||||
|
||||
/**
|
||||
* Links carry the main address of the website they belong to – not APP_URL, which is a single value and
|
||||
* would have sent every visitor of a second landlord to the first landlord's host. Visiting through a
|
||||
* further address of the same website still yields the main address, which keeps one canonical host.
|
||||
* would have sent every visitor of a second landlord to the first landlord's host. A further address of the
|
||||
* same website redirects to the main address: one canonical host, and scripts, fonts and videos load from
|
||||
* the same origin as the page (a different origin is blocked by the browser).
|
||||
*/
|
||||
public function test_links_carry_the_main_address_of_their_own_website(): void
|
||||
{
|
||||
@@ -108,9 +109,8 @@ public function test_links_carry_the_main_address_of_their_own_website(): void
|
||||
// A further address of the same website keeps pointing at its main address.
|
||||
SiteDomain::query()->create(['site_id' => Site::withoutGlobalScope('tenant')->where('tenant_id', $second->id)->value('id'), 'host' => 'www.zweiter.test']);
|
||||
|
||||
$viaWww = (string) $this->get('http://www.zweiter.test/')->assertOk()->getContent();
|
||||
|
||||
$this->assertStringContainsString('https://zweiter.test', $viaWww);
|
||||
$this->get('http://www.zweiter.test/wohnung?x=1')->assertRedirect('https://zweiter.test/wohnung?x=1')->assertStatus(301);
|
||||
$this->post('http://www.zweiter.test/wohnung')->assertStatus(405);
|
||||
}
|
||||
|
||||
public function test_the_operator_adds_an_address_to_an_existing_landlord(): void
|
||||
@@ -132,7 +132,7 @@ public function test_the_operator_adds_an_address_to_an_existing_landlord(): voi
|
||||
->call('save')
|
||||
->assertHasNoErrors();
|
||||
|
||||
$this->get('http://neu.duene.test/')->assertOk();
|
||||
$this->get('http://neu.duene.test/')->assertRedirect('https://duene.test/');
|
||||
$this->get('http://duene.test/')->assertOk();
|
||||
}
|
||||
|
||||
|
||||
@@ -62,6 +62,7 @@ public function test_chapters_are_read_as_minutes_and_seconds_sorted_and_matched
|
||||
public function test_hero_plays_a_silent_loop_instead_of_the_photo_and_shows_the_next_free_dates(): void
|
||||
{
|
||||
$loop = $this->videoWithFiles('Garten und Meer');
|
||||
$loop->update(['playback_rate' => 0.75]);
|
||||
Booking::factory()->for($this->property)->create(['arrival' => '2026-10-23', 'departure' => '2026-10-27', 'status' => BookingStatus::Confirmed]);
|
||||
$this->updateSection('start', 'hero', ['video_id' => $loop->id, 'show_free_dates' => true, 'free_dates_nights' => 3]);
|
||||
|
||||
@@ -76,6 +77,7 @@ public function test_hero_plays_a_silent_loop_instead_of_the_photo_and_shows_the
|
||||
->assertSee('data-video-loop', false)
|
||||
->assertSee('data-src="'.$loop->url().'"', false)
|
||||
->assertSee('aria-label="Video: Garten und Meer"', false)
|
||||
->assertSee('data-playback-rate="0.75"', false)
|
||||
->assertSee('Nächste freie Termine')
|
||||
->assertSee(e($stays[0]['url']), false);
|
||||
}
|
||||
@@ -133,14 +135,18 @@ public function test_content_editor_uploads_a_video_with_poster_and_chapters():
|
||||
'file' => UploadedFile::fake()->createWithContent('rundgang.mp4', (string) file_get_contents(base_path('tests/Fixtures/video.mp4'))),
|
||||
'poster' => UploadedFile::fake()->image('standbild.jpg', 1280, 720),
|
||||
'chapters' => [['at' => '0:07', 'label' => 'Garten', 'room' => null]],
|
||||
'playback_rate' => '0.75',
|
||||
])
|
||||
->call('save')
|
||||
->assertHasNoFormErrors();
|
||||
|
||||
Livewire::test(EditVideo::class, ['record' => $video->id])->assertSchemaStateSet(['playback_rate' => '0.75']);
|
||||
|
||||
$video->refresh();
|
||||
$this->assertNotNull($video->url());
|
||||
$this->assertNotNull($video->posterUrl());
|
||||
$this->assertSame(7, $video->chapterList()[0]['seconds']);
|
||||
$this->assertSame(0.75, $video->playbackRate());
|
||||
}
|
||||
|
||||
public function test_uploads_allow_videos_up_to_100_mb(): void
|
||||
|
||||
@@ -60,8 +60,9 @@ public function test_a_website_answers_on_every_address_entered_for_it(): void
|
||||
$this->editHosts($site, ['www.nordhaus.test', 'https://ALT.nordhaus.test/'])->assertHasNoFormErrors();
|
||||
|
||||
$this->get('http://nordhaus.test/')->assertOk()->assertSee('Nordhaus');
|
||||
$this->get('http://www.nordhaus.test/')->assertOk()->assertSee('Nordhaus');
|
||||
$this->get('http://alt.nordhaus.test/')->assertOk()->assertSee('Nordhaus');
|
||||
// Further addresses answer with a permanent redirect to the main address (one origin for page and assets).
|
||||
$this->get('http://www.nordhaus.test/')->assertRedirect('https://nordhaus.test/');
|
||||
$this->get('http://alt.nordhaus.test/')->assertRedirect('https://nordhaus.test/');
|
||||
$this->get('http://unbekannt.test/')->assertNotFound();
|
||||
|
||||
$this->assertSame(
|
||||
|
||||
Reference in new issue
Block a user