feat(tenant): add site title and favicon support for tenants and website types

This commit is contained in:
2026-08-14 08:55:59 -03:00
parent 4de08ff2f2
commit bfdaf1c38b
17 changed files with 355 additions and 6 deletions

View File

@@ -36,6 +36,11 @@ class CreateDesfilePuraTendenciaTenantTest extends TestCase
);
$footerBackgroundMigration->up();
$browserBrandingMigration = require database_path(
'migrations/2026_08_14_010000_set_seeded_tenant_browser_branding.php'
);
$browserBrandingMigration->up();
$this->assertDatabaseHas('tenants', [
'codigo' => 'desfile_pura_tendencia',
'nombre' => 'Desfile Pura Tendencia',
@@ -52,8 +57,25 @@ class CreateDesfilePuraTendenciaTenantTest extends TestCase
'footer_bg_color' => '#D4441C',
'display_categories' => false,
'display_seach_bar' => false,
'site_title' => 'Desfile Pura Tendencia',
]);
$this->assertDatabaseHas('tenants', [
'codigo' => 'fiesta_futbol_infantil',
'site_title' => 'Fiesta Fútbol Infantil',
]);
foreach ([
'fiesta_futbol_infantil' => 'futbol_infantil_favicon.png',
'desfile_pura_tendencia' => 'pura_tendencia_favicon.png',
] as $tenantCode => $faviconFilename) {
$faviconId = DB::table('tenants')->where('codigo', $tenantCode)->value('favicon_id');
$favicon = DB::table('attachments')->where('id', $faviconId)->sole();
$this->assertSame($faviconFilename, $favicon->filename);
Storage::disk('s3')->assertExists($favicon->path);
}
$eventDate = DB::table('event_dates')
->where('tenant_code', 'desfile_pura_tendencia')
->sole();
@@ -104,6 +126,7 @@ class CreateDesfilePuraTendenciaTenantTest extends TestCase
'desfile_pura_tendencia_footer.png',
'desfile_pura_tendencia_hero.png',
'desfile_pura_tendencia_footer_background.png',
'pura_tendencia_favicon.png',
'entrada_pasarela.png',
] as $filename) {
$path = DB::table('attachments')->where('filename', $filename)->value('path');