feat(website): add site_title to AdminAppBootstrapResource and related tests
This commit is contained in:
@@ -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,
|
||||
|
||||
@@ -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')
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user