feat(website-assets): update ShopIt website assets and adjust favicon paths

This commit is contained in:
2026-09-28 17:37:14 +00:00
parent ad054127aa
commit 370834856b
13 changed files with 103 additions and 16 deletions

View File

@@ -34,7 +34,7 @@ class SetWebsiteTypeFaviconTest extends TestCase
$this->assertSame(1, DB::table('attachments')->where('filename', 'onticket_favicon.svg')->count());
Storage::disk('s3')->assertExists($attachment->path);
$this->assertSame(
file_get_contents(public_path('images/website_types/onticket_favicon.svg')),
file_get_contents(public_path('images/website_types/onticket/onticket_favicon.svg')),
Storage::disk('s3')->get($attachment->path),
);
}

View File

@@ -23,7 +23,7 @@ class WebsiteTypeSeederTest extends TestCase
$this->assertSame(2, AdminWebsiteType::query()->count());
$this->assertSame(3, StorefrontWebsiteType::query()->count());
$this->assertSame(5, Attachment::query()->count());
$this->assertSame(6, Attachment::query()->count());
$expectedPresentation = [
'primary_color' => '#FF7006',
@@ -45,12 +45,15 @@ class WebsiteTypeSeederTest extends TestCase
$this->assertSame('ShopIt', $shopIt->nombre);
$this->assertSame('localhost', $shopIt->dominio);
$this->assertSame('scanner.localhost', $shopIt->scanner_domain);
$this->assertSame($expectedPresentation, $shopIt->only(array_keys($expectedPresentation)));
$this->assertSame('onticket_logo.png', $shopIt->siteLogo->filename);
$this->assertSame(
[...$expectedPresentation, 'primary_color' => '#2FD3AC'],
$shopIt->only(array_keys($expectedPresentation)),
);
$this->assertSame('shopit_logo.png', $shopIt->siteLogo->filename);
Storage::disk('s3')->assertExists($shopIt->siteLogo->path);
$this->assertSame('onticket_footer_logo.png', $shopIt->footerLogo->filename);
$this->assertSame('shopit_footer_logo.png', $shopIt->footerLogo->filename);
Storage::disk('s3')->assertExists($shopIt->footerLogo->path);
$this->assertSame('onticket_favicon.svg', $shopIt->favicon->filename);
$this->assertSame('shopit-favicon.svg', $shopIt->favicon->filename);
Storage::disk('s3')->assertExists($shopIt->favicon->path);
$shopItStorefront = StorefrontWebsiteType::query()->where('codigo', 'shopit')->with('extras')->sole();
$this->assertSame('standard', $shopItStorefront->header_type);
@@ -84,7 +87,7 @@ class WebsiteTypeSeederTest extends TestCase
Storage::disk('s3')->assertExists($onTicket->footerLogo->path);
$this->assertNotSame($shopIt->site_logo, $onTicket->site_logo);
$this->assertNotSame($shopIt->footer_logo, $onTicket->footer_logo);
$this->assertSame($shopIt->favicon_id, $onTicket->favicon_id);
$this->assertNotSame($shopIt->favicon_id, $onTicket->favicon_id);
$this->assertSame('onticket_favicon.svg', $onTicket->favicon->filename);
$onTicketStorefront = StorefrontWebsiteType::query()->where('codigo', 'onticket')->with('extras')->sole();
$this->assertSame('standard', $onTicketStorefront->header_type);