feat(menu): add label field to menu model and update related functionality
This commit is contained in:
@@ -26,21 +26,25 @@ class MenuSeederTest extends TestCase
|
||||
->firstOrFail();
|
||||
|
||||
$this->assertSame(Menu::CONTENT_TYPE_DYNAMIC, $account->content_type);
|
||||
$this->assertSame('Mi cuenta', $account->label);
|
||||
$this->assertSame('/mi-cuenta', $account->route);
|
||||
$this->assertSame([
|
||||
'profile',
|
||||
'purchases',
|
||||
'tickets',
|
||||
'account.profile',
|
||||
'account.purchases',
|
||||
'account.tickets',
|
||||
], $account->children->pluck('code')->sort()->values()->all());
|
||||
$this->assertSame([
|
||||
'profile' => '/mi-cuenta/datos-personales',
|
||||
'purchases' => '/mi-cuenta/compras',
|
||||
'tickets' => '/mi-cuenta/tickets',
|
||||
'account.profile' => '/mi-cuenta/datos-personales',
|
||||
'account.purchases' => '/mi-cuenta/compras',
|
||||
'account.tickets' => '/mi-cuenta/tickets',
|
||||
], $account->children->pluck('route', 'code')->sortKeys()->all());
|
||||
|
||||
$this->assertTrue(
|
||||
$tenant->menues()->where('menues.code', 'account')->exists()
|
||||
);
|
||||
$this->assertFalse(
|
||||
Menu::query()->whereIn('code', ['profile', 'purchases', 'tickets'])->exists()
|
||||
);
|
||||
}
|
||||
|
||||
public function test_it_seeds_the_help_menu_hierarchy_and_content_schemas(): void
|
||||
@@ -53,6 +57,7 @@ class MenuSeederTest extends TestCase
|
||||
->firstOrFail();
|
||||
|
||||
$this->assertSame(Menu::CONTENT_TYPE_DYNAMIC, $help->content_type);
|
||||
$this->assertSame('Ayuda', $help->label);
|
||||
$this->assertSame([
|
||||
'help.contact',
|
||||
'help.faq',
|
||||
|
||||
Reference in New Issue
Block a user