File tree Expand file tree Collapse file tree
cypress/integration/column Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -7,18 +7,22 @@ describe( 'Column Block', () => {
77 } ) ;
88
99 it ( 'Column block should not be available in block inserter' , ( ) => {
10+ // Intercept block directory request
11+ cy . intercept (
12+ '/index.php?rest_route=%2Fwp%2Fv2%2Fblock-directory%2Fsearch&term=*' ,
13+ {
14+ body : [ ] ,
15+ }
16+ ) ;
1017 cy . searchForBlock ( 'Bootstrap Column' ) ;
1118
12- // eslint-disable-next-line jest/valid-expect-in-promise
13- cy . window ( ) . then ( ( window ) => {
14- const noResultPreWP55 = window . document . querySelector (
15- '.block-editor-inserter__no-results'
16- ) ;
17- const noResultWP55 = window . document . querySelector (
18- '.block-editor-inserter__content .has-no-results'
19- ) ;
20- cy . wrap ( noResultPreWP55 || noResultWP55 ) . should ( 'exist' ) ;
21- } ) ;
19+ const noResultsSelectorPreWP55 =
20+ '//div[contains(@class,"block-editor-inserter__no-results")]' ;
21+ const noResultsSelectorWP55 =
22+ '//div[contains(@class,"block-editor-inserter__content")]//div[contains(@class,"has-no-results")]' ;
23+ cy . xpath (
24+ `${ noResultsSelectorPreWP55 } | ${ noResultsSelectorWP55 } `
25+ ) . should ( 'exist' ) ;
2226 } ) ;
2327
2428 it ( 'Column block should be initialized with default attributes' , ( ) => {
You can’t perform that action at this time.
0 commit comments