@@ -10,10 +10,11 @@ describe('Test Free - gutenberg', function() {
10
10
} ) ;
11
11
12
12
it ( 'Create all charts' , function ( ) {
13
- cy . create_available_charts ( Cypress . env ( 'chart_types' ) . free ) ;
13
+ //cy.create_available_charts(Cypress.env('chart_types').free);
14
+ cy . create_available_charts ( 1 ) ;
14
15
} ) ;
15
16
16
- it . skip ( 'Verify insertion of charts' , function ( ) {
17
+ it ( 'Verify insertion of charts' , function ( ) {
17
18
cy . visit ( '/post-new.php' ) ;
18
19
19
20
// get rid of that irritating popup
@@ -39,16 +40,16 @@ describe('Test Free - gutenberg', function() {
39
40
for ( var i = 0 ; i < Math . ceil ( parseInt ( Cypress . env ( 'chart_types' ) . free ) / 6 ) ; i ++ ) {
40
41
$pages . push ( i ) ;
41
42
}
43
+ $pages = [ 0 ] ;
42
44
cy . wrap ( $pages ) . each ( ( page , i , array ) => {
43
45
var charts = [ ] ;
44
46
cy . wrap ( page ) . then ( ( ) => {
45
47
for ( var i = page * 6 ; i < ( ( ( page * 6 ) + 6 ) > Cypress . env ( 'chart_types' ) . free ? Cypress . env ( 'chart_types' ) . free : ( ( page * 6 ) + 6 ) ) ; i ++ ) {
46
48
charts . push ( i + 1 ) ;
47
49
}
48
- console . log ( page + " added " + charts ) ;
50
+ charts = [ 1 ] ;
49
51
} ) . then ( ( ) => {
50
52
cy . wrap ( charts ) . each ( ( num , i , array ) => {
51
- console . log ( "loading " + num + " on " + page ) ;
52
53
if ( page > 0 ) {
53
54
// click load more for every page except the first.
54
55
cy . get ( '.visualizer-settings' ) . then ( ( $div ) => {
@@ -78,8 +79,9 @@ describe('Test Free - gutenberg', function() {
78
79
} ) ;
79
80
} ) ;
80
81
} ) ;
82
+ } ) . then ( ( ) => {
83
+ cy . visit ( '/post-new.php' ) ;
81
84
} ) ;
82
-
83
85
} ) ;
84
86
85
87
} )
0 commit comments