feat(website-type): add login_header_footer_color field and update related tests

This commit is contained in:
2026-07-31 12:06:13 -03:00
parent ec1d80dff2
commit 893bea1492
9 changed files with 11 additions and 15 deletions

View File

@@ -172,6 +172,7 @@ class BootstrapTenantControllerTest extends TestCase
$this->getJson('/api/tenants/bootstrap/acme.com')
->assertOk()
->assertJsonMissingPath('data.website_type')
->assertJsonPath('data.extras.contact.phone', '+54 341 555 0101')
->assertJsonMissingPath('data.extras.banner');
}

View File

@@ -39,7 +39,7 @@ class StoreTenantWithExtrasTest extends TestCase
$response
->assertCreated()
->assertJsonPath('data.website_type_code', 'onticket')
->assertJsonPath('data.website_type.codigo', 'onticket')
->assertJsonMissingPath('data.website_type')
->assertJsonPath('data.extras.eventConfig.title', 'Festival');
$tenant = Tenant::query()->where('codigo', 'festival')->sole();

View File

@@ -26,6 +26,7 @@ class WebsiteExtrasTest extends TestCase
'secondary_color',
'danger_color',
'success_color',
'login_header_footer_color',
'site_logo',
'created_at',
'updated_at',
@@ -70,6 +71,7 @@ class WebsiteExtrasTest extends TestCase
'secondary_color' => '#222222',
'danger_color' => '#ff0000',
'success_color' => '#00aa55',
'login_header_footer_color' => '#333333',
'site_logo' => $siteLogo->id,
]);
$typeExtra = $type->extras()->create([
@@ -95,6 +97,7 @@ class WebsiteExtrasTest extends TestCase
$this->assertSame('#222222', $type->secondary_color);
$this->assertSame('#ff0000', $type->danger_color);
$this->assertSame('#00aa55', $type->success_color);
$this->assertSame('#333333', $type->login_header_footer_color);
$this->assertTrue($type->siteLogo()->firstOrFail()->is($siteLogo));
$this->assertSame($type->codigo, $typeExtra->website_type_code);
$this->assertSame('whatsapp', $typeExtra->codigo);

View File

@@ -23,6 +23,7 @@ class WebsiteTypeServiceTest extends TestCase
'secondary_color' => '#222222',
'danger_color' => '#ff0000',
'success_color' => '#00aa55',
'login_header_footer_color' => '#333333',
'site_logo' => UploadedFile::fake()->image('site-logo.png'),
]);
@@ -34,6 +35,7 @@ class WebsiteTypeServiceTest extends TestCase
Storage::disk('s3')->assertExists($siteLogo->path);
$this->assertDatabaseHas('website_type', [
'codigo' => 'marketplace',
'login_header_footer_color' => '#333333',
'site_logo' => $siteLogo->id,
]);
}