@@ -105,16 +105,11 @@ test.describe('API Documentation Pages', () => {
105105
106106test . describe ( 'Version Selector' , ( ) => {
107107 test ( 'version selector dropdown shows versions' , async ( { page, goto } ) => {
108- await goto ( '/docs/ufo/v/1.6.3' , { waitUntil : 'networkidle ' } )
108+ await goto ( '/docs/ufo/v/1.6.3' , { waitUntil : 'hydration ' } )
109109
110- // Find and click the version selector button
110+ // Find and click the version selector button (wait for it to be visible)
111111 const versionButton = page . locator ( 'header button' ) . filter ( { hasText : '1.6.3' } )
112-
113- // Skip if version selector not present (data might not be loaded)
114- if ( ! ( await versionButton . isVisible ( ) ) ) {
115- test . skip ( )
116- return
117- }
112+ await expect ( versionButton ) . toBeVisible ( { timeout : 10000 } )
118113
119114 await versionButton . click ( )
120115
@@ -128,16 +123,11 @@ test.describe('Version Selector', () => {
128123 } )
129124
130125 test ( 'selecting a version navigates to that version' , async ( { page, goto } ) => {
131- await goto ( '/docs/ufo/v/1.6.3' , { waitUntil : 'networkidle ' } )
126+ await goto ( '/docs/ufo/v/1.6.3' , { waitUntil : 'hydration ' } )
132127
133- // Find and click the version selector button
128+ // Find and click the version selector button (wait for it to be visible)
134129 const versionButton = page . locator ( 'header button' ) . filter ( { hasText : '1.6.3' } )
135-
136- // Skip if version selector not present
137- if ( ! ( await versionButton . isVisible ( ) ) ) {
138- test . skip ( )
139- return
140- }
130+ await expect ( versionButton ) . toBeVisible ( { timeout : 10000 } )
141131
142132 await versionButton . click ( )
143133
@@ -167,14 +157,11 @@ test.describe('Version Selector', () => {
167157 } )
168158
169159 test ( 'escape key closes version dropdown' , async ( { page, goto } ) => {
170- await goto ( '/docs/ufo/v/1.6.3' , { waitUntil : 'networkidle ' } )
160+ await goto ( '/docs/ufo/v/1.6.3' , { waitUntil : 'hydration ' } )
171161
162+ // Wait for version button to be visible
172163 const versionButton = page . locator ( 'header button' ) . filter ( { hasText : '1.6.3' } )
173-
174- if ( ! ( await versionButton . isVisible ( ) ) ) {
175- test . skip ( )
176- return
177- }
164+ await expect ( versionButton ) . toBeVisible ( { timeout : 10000 } )
178165
179166 await versionButton . click ( )
180167
0 commit comments