File tree 2 files changed +28
-4
lines changed
2 files changed +28
-4
lines changed Original file line number Diff line number Diff line change @@ -95,4 +95,32 @@ describe('Edit Page', () => {
95
95
96
96
cy . wait ( 2500 ) ;
97
97
} ) ;
98
+
99
+ it ( 'Changes the type of text block' , ( ) => {
100
+ cy . get ( '[data-cy=block-text]' ) . click ( ) ;
101
+
102
+ cy . type ( '{delete}' * 'This is a test' . length ) ;
103
+
104
+ let currentStyle = { } ;
105
+
106
+ cy . get ( '[data-cy=block-text]' )
107
+ . invoke ( 'attr' , 'style' )
108
+ . then ( ( style ) => {
109
+ currentStyle = style ;
110
+ } ) ;
111
+
112
+ expect ( currentStyle ) . to . not . equal ( { } ) ;
113
+
114
+ cy . get ( '[data-cy=block-text]' ) . should ( 'have.text' , '' ) ;
115
+
116
+ cy . get ( '[data-cy=block-text]' ) . type ( '# H1' ) ;
117
+
118
+ cy . get ( '[data-cy=block-text]' ) . should ( 'have.text' , 'H1' ) ;
119
+
120
+ cy . get ( '[data-cy=block-text]' ) . should ( 'have.attr' , 'style' ) . should ( 'not.equal' , currentStyle ) ;
121
+
122
+ cy . get ( '[data-cy=page-title]' ) . click ( ) ;
123
+
124
+ cy . wait ( 2500 ) ;
125
+ } ) ;
98
126
} ) ;
Original file line number Diff line number Diff line change @@ -51,10 +51,6 @@ class SaveManager {
51
51
const saveManager = SaveManager . getInstance ( ) ;
52
52
const { saveData, pageSaveData } = saveManager ;
53
53
54
- if ( ! Object . keys ( saveData ) . length || ! Object . keys ( pageSaveData ) . length ) {
55
- return ;
56
- }
57
-
58
54
Object . keys ( saveData ) . forEach ( async ( page ) => {
59
55
const data = saveData [ page ] ;
60
56
You can’t perform that action at this time.
0 commit comments