@@ -17,21 +17,23 @@ test.describe( 'Should iframe', () => {
1717 // Initially, the editor should be iframed (all core blocks are v3).
1818 await expect ( iframe ) . toBeVisible ( ) ;
1919
20- // Register a v2 block dynamically.
2120 await page . evaluate ( ( ) => {
22- window . wp . blocks . registerBlockType ( 'test/v2 ' , {
23- apiVersion : 2 ,
24- title : 'Test V2 Block' ,
21+ window . wp . blocks . registerBlockType ( 'test/v1 ' , {
22+ apiVersion : 1 ,
23+ title : 'Test V1 Block' ,
2524 edit : ( ) =>
26- window . wp . element . createElement ( 'p' , null , 'v2 block' ) ,
25+ window . wp . element . createElement ( 'p' , null , 'v1 block' ) ,
2726 save : ( ) => null ,
2827 } ) ;
2928 } ) ;
3029
31- // Insert the v2 block.
32- await editor . insertBlock ( { name : 'test/v2' } ) ;
30+ // The editor should still be iframed.
31+ await expect ( iframe ) . toBeVisible ( ) ;
32+
33+ // Insert the v1 block.
34+ await editor . insertBlock ( { name : 'test/v1' } ) ;
3335
3436 // The editor should no longer be iframed.
35- await expect ( iframe ) . not . toBeVisible ( ) ;
37+ await expect ( iframe ) . toBeHidden ( ) ;
3638 } ) ;
3739} ) ;
0 commit comments