@@ -156,24 +156,26 @@ test("no console errors on card page", async ({ page }) => {
156
156
157
157
test ( "form component documentation" , async ( { page } ) => {
158
158
await page . goto ( `${ BASE } /component.sql?component=form` ) ;
159
-
159
+
160
160
// Find the form that contains radio buttons for component selection
161
- const componentForm = page . locator ( ' form' , {
162
- has : page . getByRole ( ' radio' , { name : ' Chart' } )
161
+ const componentForm = page . locator ( " form" , {
162
+ has : page . getByRole ( " radio" , { name : " Chart" } ) ,
163
163
} ) ;
164
-
164
+
165
165
// the form should be visible
166
166
await expect ( componentForm ) . toBeVisible ( ) ;
167
167
168
168
// Check that "form" is the first and default selected option
169
169
const mapRadio = componentForm . getByRole ( "radio" , { name : "Map" } ) ;
170
170
await expect ( mapRadio ) . toHaveValue ( "map" ) ;
171
171
await expect ( mapRadio ) . toBeChecked ( ) ;
172
-
172
+
173
173
// Select "Chart" option and submit
174
174
await componentForm . getByLabel ( "Chart" ) . click ( { force : true } ) ;
175
175
await componentForm . getByRole ( "button" , { name : "Submit" } ) . click ( ) ;
176
176
177
177
// Verify we're on the chart documentation page
178
- await expect ( page . getByRole ( "heading" , { name : / c h a r t / i, level : 1 } ) ) . toBeVisible ( ) ;
178
+ await expect (
179
+ page . getByRole ( "heading" , { name : / c h a r t / i, level : 1 } ) ,
180
+ ) . toBeVisible ( ) ;
179
181
} ) ;
0 commit comments