@@ -27,15 +27,15 @@ describe('Test Free - gutenberg (datatable)', function() {
27
27
28
28
cy . wrap ( charts ) . each ( ( value , i , array ) => {
29
29
// insert a visualizer block
30
- cy . get ( 'div.edit-post-header-toolbar button.edit-post-header-toolbar__inserter-toggle ' ) . click ( ) ;
31
- cy . get ( '.edit-post-layout__inserter-panel-popover-wrapper ' ) . then ( function ( $popup ) {
32
- cy . wrap ( $popup ) . find ( '.block-editor-inserter__search-input ' ) . type ( 'visua' ) ;
33
- cy . wrap ( $popup ) . find ( '.block-editor-inserter__block-list .block-editor-block-types-list__list-item ' ) . should ( 'have.length' , 1 ) ;
34
- cy . wrap ( $popup ) . find ( '.block-editor-inserter__block-list button. editor-block-list-item-visualizer-chart ' ) . click ( ) ;
30
+ cy . get ( 'div.edit-post-header-toolbar .block-editor-inserter button ' ) . click ( ) ;
31
+ cy . get ( '.components-popover__content ' ) . then ( function ( $popup ) {
32
+ cy . wrap ( $popup ) . find ( '.block-editor-inserter__search' ) . type ( 'visua' ) ;
33
+ cy . wrap ( $popup ) . find ( '.block-editor-inserter__results ul .block-editor-block-types-list li ' ) . should ( 'have.length' , 1 ) ;
34
+ cy . wrap ( $popup ) . find ( '.block-editor-inserter__results ul.block- editor-block-types-list li button ' ) . click ( ) ;
35
35
} ) ;
36
36
37
37
// see the block has the correct elements.
38
- cy . get ( 'div[data-type="visualizer/chart"]' ) . should ( 'have.length' , ( i + 1 ) ) ;
38
+ cy . get ( 'div[data-type="visualizer/chart"]' ) . should ( 'have.length' , ( i + 2 ) ) ;
39
39
40
40
cy . get ( 'div[data-type="visualizer/chart"]:nth-child(' + ( i + 1 ) + ')' ) . then ( ( $block ) => {
41
41
// 2 rows - create and insert
@@ -61,10 +61,7 @@ describe('Test Free - gutenberg (datatable)', function() {
61
61
cy . wrap ( $block ) . find ( '.visualizer-settings .components-button-group button' ) . should ( 'have.length' , 2 ) ;
62
62
cy . wrap ( $block ) . find ( '.visualizer-settings .components-button-group button.visualizer-bttn-done' ) . should ( 'have.length' , 1 ) ;
63
63
64
- // make the settings block appear.
65
- cy . wrap ( $block ) . type ( '{ctrl}{shift},' ) ;
66
-
67
- // click advanced options.
64
+ // click advanced options
68
65
cy . get ( '.visualizer-advanced-options button.components-button' ) . click ( { force :true } ) ;
69
66
70
67
// done button disappears, save button appears
0 commit comments