feat(website-extras): enhance toggle functionality and update related tests; add additional info configuration to tenant extras
This commit is contained in:
@@ -84,12 +84,13 @@ class TenantSeederTest extends TestCase
|
||||
|
||||
$extras = $fiesta->websiteExtras->keyBy('websiteTypeExtra.codigo');
|
||||
$this->assertEqualsCanonicalizing(
|
||||
['heroConfig', 'eventConfig'],
|
||||
['heroConfig', 'eventConfig', 'additionalInfoConfig'],
|
||||
$extras->keys()->all(),
|
||||
);
|
||||
|
||||
$heroConfig = $extras->get('heroConfig')->config;
|
||||
$this->assertSame('<h1>Fiesta Fútbol Infantil</h1>', $heroConfig['title_html']);
|
||||
$this->assertArrayNotHasKey('description_html', $heroConfig);
|
||||
$this->assertIsInt($heroConfig['background_image_id']);
|
||||
$this->assertDatabaseHas('attachments', [
|
||||
'id' => $heroConfig['background_image_id'],
|
||||
@@ -101,9 +102,21 @@ class TenantSeederTest extends TestCase
|
||||
'location' => 'Rosario, Santa Fe',
|
||||
'dates_text' => '9, 10, 11 y 12 de Octubre 2026',
|
||||
'dates' => [
|
||||
'2026-12-05',
|
||||
'2026-12-06',
|
||||
[
|
||||
'date' => '2026-12-05',
|
||||
'start_time' => '09:00',
|
||||
'end_time' => '18:00',
|
||||
],
|
||||
[
|
||||
'date' => '2026-12-06',
|
||||
'start_time' => '09:00',
|
||||
'end_time' => '18:00',
|
||||
],
|
||||
],
|
||||
], $extras->get('eventConfig')->config);
|
||||
|
||||
$this->assertSame([
|
||||
'description' => '<p>Viví una jornada inolvidable de fútbol infantil.</p>',
|
||||
], $extras->get('additionalInfoConfig')->config);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user