@@ -9,46 +9,14 @@ describe('Test Free - gutenberg', function() {
9
9
cy . get ( '#wp-submit' ) . click ( ) ;
10
10
} ) ;
11
11
12
- it ( 'temp test' , function ( ) {
13
- cy . create_available_charts ( 1 ) ;
14
- cy . visit ( '/post-new.php' ) ;
15
- cy . clear_welcome ( ) ;
16
-
17
- var charts = [ ] ;
18
- for ( var i = 1 ; i <= 1 ; i ++ ) {
19
- charts . push ( i ) ;
20
- }
21
-
22
- cy . wrap ( charts ) . each ( ( value , i , array ) => {
23
- // insert a visualizer block
24
- cy . get ( 'div.edit-post-header-toolbar .block-editor-inserter button' ) . click ( ) ;
25
- cy . get ( '.components-popover__content' ) . then ( function ( $popup ) {
26
- cy . wrap ( $popup ) . find ( '.block-editor-inserter__search' ) . type ( 'visua' ) ;
27
- cy . wrap ( $popup ) . find ( '.block-editor-inserter__results ul.block-editor-block-types-list li' ) . should ( 'have.length' , 1 ) ;
28
- cy . wrap ( $popup ) . find ( '.block-editor-inserter__results ul.block-editor-block-types-list li button' ) . click ( ) ;
29
- } ) ;
30
-
31
- // see the block has the correct elements.
32
- cy . get ( 'div[data-type="visualizer/chart"]' ) . should ( 'have.length' , ( i + 2 ) ) ;
33
-
34
- cy . get ( 'div[data-type="visualizer/chart"]:nth-child(' + ( i + 1 ) + ')' ) . then ( ( $block ) => {
35
- cy . wrap ( $block ) . find ( '.visualizer-settings__content-option' ) . should ( 'have.length' , 2 ) ;
36
- cy . wrap ( $block ) . find ( '.visualizer-settings__content-option' ) . last ( ) . click ( { force :true } ) ;
37
-
38
- cy . wrap ( $block ) . find ( '.visualizer-settings .visualizer-settings__charts-single:nth-child(' + ( i + 1 ) + ') .visualizer-settings__charts-controls' ) . click ( ) ;
39
- cy . wrap ( $block ) . find ( '.visualizer-settings .visualizer-settings__chart' ) . should ( 'have.length' , 1 ) ;
40
- cy . wrap ( $block ) . find ( '.visualizer-settings .visualizer-settings__chart > div' ) . should ( 'have.length' , 2 ) ;
41
- cy . wrap ( $block ) . find ( '.visualizer-settings .components-button-group button' ) . should ( 'have.length' , 2 ) ;
42
- } ) ;
43
- } ) ;
44
-
12
+ it . skip ( 'temp test' , function ( ) {
45
13
} ) ;
46
14
47
- it . skip ( 'Create all charts' , function ( ) {
15
+ it ( 'Create all charts' , function ( ) {
48
16
cy . create_available_charts ( Cypress . env ( 'chart_types' ) . free ) ;
49
17
} ) ;
50
18
51
- it . skip ( 'Verify insertion of charts' , function ( ) {
19
+ it ( 'Verify insertion of charts' , function ( ) {
52
20
cy . visit ( '/post-new.php' ) ;
53
21
54
22
cy . clear_welcome ( ) ;
@@ -68,7 +36,7 @@ describe('Test Free - gutenberg', function() {
68
36
} ) ;
69
37
70
38
// see the block has the correct elements.
71
- cy . get ( 'div[data-type="visualizer/chart"]' ) . should ( 'have.length' , ( i + 1 ) ) ;
39
+ cy . get ( 'div[data-type="visualizer/chart"]' ) . should ( 'have.length' , ( i + 2 ) ) ;
72
40
73
41
cy . get ( 'div[data-type="visualizer/chart"]:nth-child(' + ( i + 1 ) + ')' ) . then ( ( $block ) => {
74
42
cy . wrap ( $block ) . find ( '.visualizer-settings__content-option' ) . should ( 'have.length' , 2 ) ;
0 commit comments