diff --git a/app/Domains/Bootstrap/Resources/AdminAppBootstrapResource.php b/app/Domains/Bootstrap/Resources/AdminAppBootstrapResource.php index 63ba328..e81effb 100644 --- a/app/Domains/Bootstrap/Resources/AdminAppBootstrapResource.php +++ b/app/Domains/Bootstrap/Resources/AdminAppBootstrapResource.php @@ -17,6 +17,7 @@ class AdminAppBootstrapResource extends JsonResource return [ 'website_type_code' => $websiteType->codigo, + 'site_title' => $websiteType->site_title, 'primary_color' => $websiteType->primary_color, 'secondary_color' => $websiteType->secondary_color, 'danger_color' => $websiteType->danger_color, diff --git a/tests/Feature/Tenant/BootstrapAdminAppControllerTest.php b/tests/Feature/Tenant/BootstrapAdminAppControllerTest.php index 9912805..c9fdd36 100644 --- a/tests/Feature/Tenant/BootstrapAdminAppControllerTest.php +++ b/tests/Feature/Tenant/BootstrapAdminAppControllerTest.php @@ -20,6 +20,7 @@ class BootstrapAdminAppControllerTest extends TestCase 'codigo' => 'shopit', 'nombre' => 'ShopIt', 'dominio' => 'admin.shopit.test', + 'site_title' => 'ShopIt Website Type', 'primary_color' => '#112233', 'secondary_color' => '#445566', 'danger_color' => '#aa0000', @@ -38,6 +39,7 @@ class BootstrapAdminAppControllerTest extends TestCase $this->getJson('/api/v1/adminapp/bootstrap/ADMIN.SHOPIT.TEST') ->assertOk() ->assertJsonPath('data.website_type_code', 'shopit') + ->assertJsonPath('data.site_title', 'ShopIt Website Type') ->assertJsonPath('data.primary_color', '#112233') ->assertJsonPath('data.warning_color', '#ffaa00') ->assertJsonPath('data.login_header_footer_color', '#313131') diff --git a/tests/Feature/Tenant/BootstrapScannerControllerTest.php b/tests/Feature/Tenant/BootstrapScannerControllerTest.php index c40c9e1..79ca2c8 100644 --- a/tests/Feature/Tenant/BootstrapScannerControllerTest.php +++ b/tests/Feature/Tenant/BootstrapScannerControllerTest.php @@ -21,6 +21,7 @@ class BootstrapScannerControllerTest extends TestCase 'nombre' => 'ShopIt', 'dominio' => 'admin.shopit.test', 'scanner_domain' => 'scanner.shopit.test', + 'site_title' => 'ShopIt Website Type', 'primary_color' => '#112233', 'secondary_color' => '#445566', 'danger_color' => '#aa0000', @@ -39,6 +40,7 @@ class BootstrapScannerControllerTest extends TestCase $this->getJson('/api/v1/scanner/bootstrap/SCANNER.SHOPIT.TEST') ->assertOk() ->assertJsonPath('data.website_type_code', 'shopit') + ->assertJsonPath('data.site_title', 'ShopIt Website Type') ->assertJsonPath('data.primary_color', '#112233') ->assertJsonPath('data.site_logo', $siteLogo->getTemporaryUrl(1440)) ->assertJsonPath('data.footer_logo', null) diff --git a/tests/Unit/Bootstrap/AdminAppBootstrapResourceTest.php b/tests/Unit/Bootstrap/AdminAppBootstrapResourceTest.php index 7a01e39..688f3ab 100644 --- a/tests/Unit/Bootstrap/AdminAppBootstrapResourceTest.php +++ b/tests/Unit/Bootstrap/AdminAppBootstrapResourceTest.php @@ -14,6 +14,7 @@ class AdminAppBootstrapResourceTest extends TestCase 'codigo' => 'shopit', 'nombre' => 'ShopIt', 'dominio' => 'admin.shopit.test', + 'site_title' => 'ShopIt Website Type', ]); $websiteType->setRelation('siteLogo', null); $websiteType->setRelation('footerLogo', null); @@ -23,6 +24,7 @@ class AdminAppBootstrapResourceTest extends TestCase ])->resolve(request()); $this->assertSame('shopit', $data['website_type_code']); + $this->assertSame('ShopIt Website Type', $data['site_title']); $this->assertNull($data['favicon']); $this->assertArrayNotHasKey('forms', $data); }