feat(SPA): screens for Sites and Authors
This commit is contained in:
1 parent
b34a173d83
commit
3d81d2c717
82 files changed
+10676
-37
No files matched your search
@@ -0,0 +1,15 @@
|
||||
import { describe, expect, it } from 'vitest'
|
||||
import router from '@/router'
|
||||
|
||||
describe('Sites and authors routes', () => {
|
||||
it.each([
|
||||
['/settings/sites', 'Settings'],
|
||||
['/authors', 'Authors'],
|
||||
])('registers %s as a verified, lazy-loaded route', (path, title) => {
|
||||
const route = router.getRoutes().find((candidate) => candidate.path === path)!
|
||||
|
||||
expect(route.meta.auth).toBe('verified')
|
||||
expect(route.meta.title).toBe(title)
|
||||
expect(typeof route.components?.default).toBe('function')
|
||||
})
|
||||
})
|
||||
@@ -77,6 +77,11 @@ const routes: RouteRecordRaw[] = [
|
||||
component: () => import('@/views/MediaView.vue'),
|
||||
meta: { auth: 'verified', title: 'Media' },
|
||||
},
|
||||
{
|
||||
path: '/authors',
|
||||
component: () => import('@/views/AuthorsView.vue'),
|
||||
meta: { auth: 'verified', title: 'Authors' },
|
||||
},
|
||||
{
|
||||
path: '/users',
|
||||
component: () => import('@/views/UsersView.vue'),
|
||||
@@ -112,6 +117,11 @@ const routes: RouteRecordRaw[] = [
|
||||
component: () => import('@/views/VariantsPage.vue'),
|
||||
meta: { auth: 'verified', title: 'Settings' },
|
||||
},
|
||||
{
|
||||
path: '/settings/sites',
|
||||
component: () => import('@/views/SitesView.vue'),
|
||||
meta: { auth: 'verified', title: 'Settings' },
|
||||
},
|
||||
{
|
||||
path: '/settings/media/cache',
|
||||
component: () => import('@/views/CachePage.vue'),
|
||||
|
||||
Reference in new issue
Block a user