feat(website-type): add footer logo support in WebsiteType model, controller, and resource; update seeder and tests

This commit is contained in:
2026-07-31 14:16:58 -03:00
parent f603a82b5e
commit dd76d5d951
11 changed files with 111 additions and 28 deletions

View File

@@ -21,7 +21,7 @@ class WebsiteTypeSeederTest extends TestCase
$this->seed(WebsiteTypeSeeder::class);
$this->assertSame(2, WebsiteType::query()->count());
$this->assertSame(2, Attachment::query()->count());
$this->assertSame(4, Attachment::query()->count());
$expectedPresentation = [
'primary_color' => '#FF7006',
@@ -46,6 +46,8 @@ class WebsiteTypeSeederTest extends TestCase
$this->assertSame($expectedPresentation, $shopIt->only(array_keys($expectedPresentation)));
$this->assertSame('onticket_logo.png', $shopIt->siteLogo->filename);
Storage::disk('s3')->assertExists($shopIt->siteLogo->path);
$this->assertSame('onticket_footer_logo.png', $shopIt->footerLogo->filename);
Storage::disk('s3')->assertExists($shopIt->footerLogo->path);
$this->assertSame(['carousel'], $shopIt->extras->pluck('codigo')->all());
$this->assertSame('Carrusel principal', $shopIt->extras->sole()->nombre);
$this->assertSame([
@@ -71,7 +73,10 @@ class WebsiteTypeSeederTest extends TestCase
$this->assertSame($expectedPresentation, $onTicket->only(array_keys($expectedPresentation)));
$this->assertSame('onticket_logo.png', $onTicket->siteLogo->filename);
Storage::disk('s3')->assertExists($onTicket->siteLogo->path);
$this->assertSame('onticket_footer_logo.png', $onTicket->footerLogo->filename);
Storage::disk('s3')->assertExists($onTicket->footerLogo->path);
$this->assertNotSame($shopIt->site_logo, $onTicket->site_logo);
$this->assertNotSame($shopIt->footer_logo, $onTicket->footer_logo);
$this->assertEqualsCanonicalizing(
['heroConfig', 'eventConfig'],
$onTicket->extras->pluck('codigo')->all(),