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

@@ -2,6 +2,7 @@
namespace Tests\Feature\Tenant;
use App\Domains\Attachable\Models\Attachment;
use App\Domains\Tenant\Models\WebsiteType;
use Illuminate\Foundation\Testing\RefreshDatabase;
use Tests\TestCase;
@@ -12,6 +13,8 @@ class BootstrapAdminAppControllerTest extends TestCase
public function test_it_publicly_bootstraps_the_admin_app_by_domain(): void
{
$footerLogo = Attachment::factory()->create();
WebsiteType::query()->create([
'codigo' => 'shopit',
'nombre' => 'ShopIt',
@@ -27,6 +30,7 @@ class BootstrapAdminAppControllerTest extends TestCase
'background_color' => '#f8f8f8',
'border_color' => '#eaeaea',
'login_header_footer_color' => '#313131',
'footer_logo' => $footerLogo->id,
]);
$this->getJson('/api/v1/adminapp/bootstrap/ADMIN.SHOPIT.TEST')
@@ -37,7 +41,8 @@ class BootstrapAdminAppControllerTest extends TestCase
->assertJsonPath('data.primary_color', '#112233')
->assertJsonPath('data.warning_color', '#ffaa00')
->assertJsonPath('data.login_header_footer_color', '#313131')
->assertJsonPath('data.site_logo', null);
->assertJsonPath('data.site_logo', null)
->assertJsonPath('data.footer_logo', $footerLogo->getTemporaryUrl(1440));
}
public function test_it_returns_not_found_for_an_unknown_domain(): void