feat(onticket): add immersive hero configuration and carousel, update tenant seeder and tests
This commit is contained in:
@@ -345,12 +345,12 @@ class BootstrapTenantControllerTest extends TestCase
|
||||
->where('codigo', 'onticket_multi_event')
|
||||
->firstOrFail()
|
||||
->extras()
|
||||
->where('codigo', 'heroCarousel')
|
||||
->where('codigo', 'immersiveHeroCarousel')
|
||||
->firstOrFail();
|
||||
|
||||
$images = collect(['first.jpg', 'second.jpg'])->map(fn (string $filename): Attachment => Attachment::query()->create([
|
||||
'key' => (string) Str::uuid(),
|
||||
'path' => "tenants/acme/extras/heroCarousel/{$filename}",
|
||||
'path' => "tenants/acme/extras/immersiveHeroCarousel/{$filename}",
|
||||
'filename' => $filename,
|
||||
'type' => AttachmentType::Image,
|
||||
'mime_type' => 'image/jpeg',
|
||||
@@ -365,10 +365,10 @@ class BootstrapTenantControllerTest extends TestCase
|
||||
$this->assertSame($images->pluck('id')->all(), $extra->fresh()->config);
|
||||
|
||||
$response = $this->getJson('/api/tenants/bootstrap?dominio=acme.com&path=%2F')->assertOk();
|
||||
$response->assertJsonCount(2, 'data.extras.heroCarousel');
|
||||
$response->assertJsonCount(2, 'data.extras.immersiveHeroCarousel');
|
||||
|
||||
foreach ($images->values() as $index => $image) {
|
||||
$response->assertJsonPath("data.extras.heroCarousel.{$index}", function (string $url) use ($image): bool {
|
||||
$response->assertJsonPath("data.extras.immersiveHeroCarousel.{$index}", function (string $url) use ($image): bool {
|
||||
return str_contains($url, $image->path)
|
||||
&& (str_contains($url, 'Expires=') || str_contains($url, 'X-Amz-Expires='));
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user