@@ -354,9 +354,19 @@ describe('PropertiesModal', () => {
354
354
mockedIsFeatureEnabled . mockReturnValue ( false ) ;
355
355
const props = createProps ( ) ;
356
356
props . onlyApply = false ;
357
- render ( < PropertiesModal { ...props } /> , {
357
+ // Pass dashboardInfo to avoid loading state
358
+ const propsWithDashboardInfo = {
359
+ ...props ,
360
+ dashboardInfo : {
361
+ ...dashboardInfo ,
362
+ json_metadata : mockedJsonMetadata ,
363
+ } ,
364
+ } ;
365
+ render ( < PropertiesModal { ...propsWithDashboardInfo } /> , {
358
366
useRedux : true ,
359
367
} ) ;
368
+
369
+ // Wait for the form to be visible
360
370
expect (
361
371
await screen . findByTestId ( 'dashboard-edit-properties-form' ) ,
362
372
) . toBeInTheDocument ( ) ;
@@ -379,9 +389,19 @@ describe('PropertiesModal', () => {
379
389
mockedIsFeatureEnabled . mockReturnValue ( false ) ;
380
390
const props = createProps ( ) ;
381
391
props . onlyApply = true ;
382
- render ( < PropertiesModal { ...props } /> , {
392
+ // Pass dashboardInfo to avoid loading state
393
+ const propsWithDashboardInfo = {
394
+ ...props ,
395
+ dashboardInfo : {
396
+ ...dashboardInfo ,
397
+ json_metadata : mockedJsonMetadata ,
398
+ } ,
399
+ } ;
400
+ render ( < PropertiesModal { ...propsWithDashboardInfo } /> , {
383
401
useRedux : true ,
384
402
} ) ;
403
+
404
+ // Wait for the form to be visible
385
405
expect (
386
406
await screen . findByTestId ( 'dashboard-edit-properties-form' ) ,
387
407
) . toBeInTheDocument ( ) ;
0 commit comments