fix: align dashboard guard with fallback menu access
Build & Deploy / Build & Push Docker Image (push) Successful in 2m46s
Test / Type Check (all packages) (push) Successful in 53s
Build & Deploy / Deploy to VPS (push) Successful in 4s
Test / API Unit Tests (push) Successful in 49s
Test / Homepage Unit Tests (push) Successful in 43s
Test / Storefront Unit Tests (push) Successful in 41s
Test / Admin Unit Tests (push) Successful in 41s
Test / Dashboard Unit Tests (push) Successful in 41s
Test / API Integration Tests (push) Successful in 1m1s
Build & Deploy / Build & Push Docker Image (push) Successful in 2m46s
Test / Type Check (all packages) (push) Successful in 53s
Build & Deploy / Deploy to VPS (push) Successful in 4s
Test / API Unit Tests (push) Successful in 49s
Test / Homepage Unit Tests (push) Successful in 43s
Test / Storefront Unit Tests (push) Successful in 41s
Test / Admin Unit Tests (push) Successful in 41s
Test / Dashboard Unit Tests (push) Successful in 41s
Test / API Integration Tests (push) Successful in 1m1s
This commit is contained in:
@@ -66,6 +66,34 @@ describe('DashboardAccessGuard route helpers', () => {
|
||||
])
|
||||
})
|
||||
|
||||
it('uses baseline routes when the production menu only contains dashboard and billing recovery links', () => {
|
||||
expect(resolveAllowedRoutes({
|
||||
subscriptionAccessLevel: 'full',
|
||||
items: [
|
||||
{
|
||||
id: 'dashboard',
|
||||
itemType: 'INTERNAL_PAGE',
|
||||
routeOrUrl: '/',
|
||||
children: [],
|
||||
},
|
||||
{
|
||||
id: 'subscription',
|
||||
itemType: 'INTERNAL_PAGE',
|
||||
routeOrUrl: '/subscription',
|
||||
children: [],
|
||||
},
|
||||
],
|
||||
}, 'OWNER')).toEqual([
|
||||
'/',
|
||||
'/reservations',
|
||||
'/fleet',
|
||||
'/customers',
|
||||
'/reports',
|
||||
'/billing',
|
||||
'/settings',
|
||||
])
|
||||
})
|
||||
|
||||
it('does not apply baseline fallback when subscription access is none', () => {
|
||||
expect(resolveAllowedRoutes({ items: [], subscriptionAccessLevel: 'none' }, 'OWNER')).toEqual([])
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user