@@ -64,51 +64,19 @@ export function getRoutesByType() {
64
64
const allRoutes = getAllStaticRoutes ( ) ;
65
65
66
66
return {
67
- docs : allRoutes . filter ( ( route ) => route . type === 'docs' ) ,
68
- blog : allRoutes . filter ( ( route ) => route . type === 'blog' ) ,
69
- learn : allRoutes . filter ( ( route ) => route . type === 'learn' ) ,
70
- all : allRoutes ,
67
+ '/docs/13' : allRoutes . filter (
68
+ ( route ) => route . type === 'docs' && route . url . startsWith ( '/docs/13' ) ,
69
+ ) ,
70
+ '/docs/14' : allRoutes . filter (
71
+ ( route ) => route . type === 'docs' && route . url . startsWith ( '/docs/14' ) ,
72
+ ) ,
73
+ '/docs' : allRoutes . filter (
74
+ ( route ) =>
75
+ route . type === 'docs' &&
76
+ ! route . url . startsWith ( '/docs/13' ) &&
77
+ ! route . url . startsWith ( '/docs/14' ) ,
78
+ ) ,
79
+ '/blog' : allRoutes . filter ( ( route ) => route . type === 'blog' ) ,
80
+ '/learn' : allRoutes . filter ( ( route ) => route . type === 'learn' ) ,
71
81
} ;
72
82
}
73
-
74
- /**
75
- * Get a sample of routes for quick testing
76
- */
77
- export function getSampleRoutes ( limit = 10 ) : StaticRoute [ ] {
78
- const routes = getAllStaticRoutes ( ) ;
79
-
80
- // Get a balanced sample from each type
81
- const sampleSize = Math . ceil ( limit / 3 ) ;
82
- const routesByType = getRoutesByType ( ) ;
83
-
84
- return [
85
- ...routesByType . docs . slice ( 0 , sampleSize ) ,
86
- ...routesByType . blog . slice ( 0 , sampleSize ) ,
87
- ...routesByType . learn . slice ( 0 , sampleSize ) ,
88
- ] . slice ( 0 , limit ) ;
89
- }
90
-
91
- /**
92
- * Clean URL by removing fragments that might cause navigation issues
93
- */
94
- export function cleanUrl ( url : string ) : string {
95
- // Remove URL fragments (#) that can cause timeouts in tests
96
- return url . split ( '#' ) [ 0 ] ;
97
- }
98
-
99
- /**
100
- * Check if a URL has fragments that might cause navigation issues
101
- */
102
- export function hasUrlFragments ( url : string ) : boolean {
103
- return url . includes ( '#' ) ;
104
- }
105
-
106
- /**
107
- * Get routes suitable for e2e testing (clean URLs without fragments)
108
- */
109
- export function getTestableRoutes ( ) : StaticRoute [ ] {
110
- return getAllStaticRoutes ( ) . map ( ( route ) => ( {
111
- ...route ,
112
- url : cleanUrl ( route . url ) ,
113
- } ) ) ;
114
- }
0 commit comments