feat: simplify testing structure into api and e2e categories

This commit is contained in:
bipproduction
2026-02-08 11:01:55 +08:00
parent 4640b72ca6
commit 0f71798389
18 changed files with 1006 additions and 62 deletions

View File

@@ -11,12 +11,13 @@
import { Route as rootRouteImport } from './routes/__root'
import { Route as SignupRouteImport } from './routes/signup'
import { Route as SigninRouteImport } from './routes/signin'
import { Route as ProfileRouteImport } from './routes/profile'
import { Route as DashboardRouteRouteImport } from './routes/dashboard/route'
import { Route as IndexRouteImport } from './routes/index'
import { Route as UsersIndexRouteImport } from './routes/users/index'
import { Route as ProfileIndexRouteImport } from './routes/profile/index'
import { Route as DashboardIndexRouteImport } from './routes/dashboard/index'
import { Route as UsersIdRouteImport } from './routes/users/$id'
import { Route as ProfileEditRouteImport } from './routes/profile/edit'
import { Route as DashboardUsersRouteImport } from './routes/dashboard/users'
import { Route as DashboardSettingsRouteImport } from './routes/dashboard/settings'
import { Route as DashboardApikeyRouteImport } from './routes/dashboard/apikey'
@@ -31,11 +32,6 @@ const SigninRoute = SigninRouteImport.update({
path: '/signin',
getParentRoute: () => rootRouteImport,
} as any)
const ProfileRoute = ProfileRouteImport.update({
id: '/profile',
path: '/profile',
getParentRoute: () => rootRouteImport,
} as any)
const DashboardRouteRoute = DashboardRouteRouteImport.update({
id: '/dashboard',
path: '/dashboard',
@@ -51,6 +47,11 @@ const UsersIndexRoute = UsersIndexRouteImport.update({
path: '/users/',
getParentRoute: () => rootRouteImport,
} as any)
const ProfileIndexRoute = ProfileIndexRouteImport.update({
id: '/profile/',
path: '/profile/',
getParentRoute: () => rootRouteImport,
} as any)
const DashboardIndexRoute = DashboardIndexRouteImport.update({
id: '/',
path: '/',
@@ -61,6 +62,11 @@ const UsersIdRoute = UsersIdRouteImport.update({
path: '/users/$id',
getParentRoute: () => rootRouteImport,
} as any)
const ProfileEditRoute = ProfileEditRouteImport.update({
id: '/profile/edit',
path: '/profile/edit',
getParentRoute: () => rootRouteImport,
} as any)
const DashboardUsersRoute = DashboardUsersRouteImport.update({
id: '/users',
path: '/users',
@@ -80,40 +86,43 @@ const DashboardApikeyRoute = DashboardApikeyRouteImport.update({
export interface FileRoutesByFullPath {
'/': typeof IndexRoute
'/dashboard': typeof DashboardRouteRouteWithChildren
'/profile': typeof ProfileRoute
'/signin': typeof SigninRoute
'/signup': typeof SignupRoute
'/dashboard/apikey': typeof DashboardApikeyRoute
'/dashboard/settings': typeof DashboardSettingsRoute
'/dashboard/users': typeof DashboardUsersRoute
'/profile/edit': typeof ProfileEditRoute
'/users/$id': typeof UsersIdRoute
'/dashboard/': typeof DashboardIndexRoute
'/profile/': typeof ProfileIndexRoute
'/users/': typeof UsersIndexRoute
}
export interface FileRoutesByTo {
'/': typeof IndexRoute
'/profile': typeof ProfileRoute
'/signin': typeof SigninRoute
'/signup': typeof SignupRoute
'/dashboard/apikey': typeof DashboardApikeyRoute
'/dashboard/settings': typeof DashboardSettingsRoute
'/dashboard/users': typeof DashboardUsersRoute
'/profile/edit': typeof ProfileEditRoute
'/users/$id': typeof UsersIdRoute
'/dashboard': typeof DashboardIndexRoute
'/profile': typeof ProfileIndexRoute
'/users': typeof UsersIndexRoute
}
export interface FileRoutesById {
__root__: typeof rootRouteImport
'/': typeof IndexRoute
'/dashboard': typeof DashboardRouteRouteWithChildren
'/profile': typeof ProfileRoute
'/signin': typeof SigninRoute
'/signup': typeof SignupRoute
'/dashboard/apikey': typeof DashboardApikeyRoute
'/dashboard/settings': typeof DashboardSettingsRoute
'/dashboard/users': typeof DashboardUsersRoute
'/profile/edit': typeof ProfileEditRoute
'/users/$id': typeof UsersIdRoute
'/dashboard/': typeof DashboardIndexRoute
'/profile/': typeof ProfileIndexRoute
'/users/': typeof UsersIndexRoute
}
export interface FileRouteTypes {
@@ -121,49 +130,53 @@ export interface FileRouteTypes {
fullPaths:
| '/'
| '/dashboard'
| '/profile'
| '/signin'
| '/signup'
| '/dashboard/apikey'
| '/dashboard/settings'
| '/dashboard/users'
| '/profile/edit'
| '/users/$id'
| '/dashboard/'
| '/profile/'
| '/users/'
fileRoutesByTo: FileRoutesByTo
to:
| '/'
| '/profile'
| '/signin'
| '/signup'
| '/dashboard/apikey'
| '/dashboard/settings'
| '/dashboard/users'
| '/profile/edit'
| '/users/$id'
| '/dashboard'
| '/profile'
| '/users'
id:
| '__root__'
| '/'
| '/dashboard'
| '/profile'
| '/signin'
| '/signup'
| '/dashboard/apikey'
| '/dashboard/settings'
| '/dashboard/users'
| '/profile/edit'
| '/users/$id'
| '/dashboard/'
| '/profile/'
| '/users/'
fileRoutesById: FileRoutesById
}
export interface RootRouteChildren {
IndexRoute: typeof IndexRoute
DashboardRouteRoute: typeof DashboardRouteRouteWithChildren
ProfileRoute: typeof ProfileRoute
SigninRoute: typeof SigninRoute
SignupRoute: typeof SignupRoute
ProfileEditRoute: typeof ProfileEditRoute
UsersIdRoute: typeof UsersIdRoute
ProfileIndexRoute: typeof ProfileIndexRoute
UsersIndexRoute: typeof UsersIndexRoute
}
@@ -183,13 +196,6 @@ declare module '@tanstack/react-router' {
preLoaderRoute: typeof SigninRouteImport
parentRoute: typeof rootRouteImport
}
'/profile': {
id: '/profile'
path: '/profile'
fullPath: '/profile'
preLoaderRoute: typeof ProfileRouteImport
parentRoute: typeof rootRouteImport
}
'/dashboard': {
id: '/dashboard'
path: '/dashboard'
@@ -211,6 +217,13 @@ declare module '@tanstack/react-router' {
preLoaderRoute: typeof UsersIndexRouteImport
parentRoute: typeof rootRouteImport
}
'/profile/': {
id: '/profile/'
path: '/profile'
fullPath: '/profile/'
preLoaderRoute: typeof ProfileIndexRouteImport
parentRoute: typeof rootRouteImport
}
'/dashboard/': {
id: '/dashboard/'
path: '/'
@@ -225,6 +238,13 @@ declare module '@tanstack/react-router' {
preLoaderRoute: typeof UsersIdRouteImport
parentRoute: typeof rootRouteImport
}
'/profile/edit': {
id: '/profile/edit'
path: '/profile/edit'
fullPath: '/profile/edit'
preLoaderRoute: typeof ProfileEditRouteImport
parentRoute: typeof rootRouteImport
}
'/dashboard/users': {
id: '/dashboard/users'
path: '/users'
@@ -270,10 +290,11 @@ const DashboardRouteRouteWithChildren = DashboardRouteRoute._addFileChildren(
const rootRouteChildren: RootRouteChildren = {
IndexRoute: IndexRoute,
DashboardRouteRoute: DashboardRouteRouteWithChildren,
ProfileRoute: ProfileRoute,
SigninRoute: SigninRoute,
SignupRoute: SignupRoute,
ProfileEditRoute: ProfileEditRoute,
UsersIdRoute: UsersIdRoute,
ProfileIndexRoute: ProfileIndexRoute,
UsersIndexRoute: UsersIndexRoute,
}
export const routeTree = rootRouteImport