@@ -119,10 +119,13 @@ describe('Block Tests', () => {
119
119
it ( 'Admin can show/hide groups from block settings' , ( ) => {
120
120
// Show groups
121
121
cy . visit ( `/wp-admin/post.php?post=${ postId } &action=edit` ) ;
122
- cy . getBlockEditor ( ) . find ( 'h2[aria-label="Enter a header (optional) "]' ) . click ( ) ;
123
- cy . openDocumentSettingsPanel ( 'Settings' , 'Block' ) ;
124
- cy . get ( '.mailchimp-interest-groups input.components-form-toggle__input ' ) . first ( ) . check ( ) ;
122
+ cy . getBlockEditor ( ) . find ( 'div[data-title="Email Field "]' ) . click ( ) ;
123
+ cy . getBlockEditor ( ) . find ( '.mc_interests_header label' ) . first ( ) . click ( ) ;
124
+ cy . get ( '.block-editor-block-toolbar__slot ' ) . should ( 'be.visible' ) ;
125
125
126
+ cy . get ( '.block-editor-block-toolbar__slot' )
127
+ . find ( 'button[aria-label="Visibility"].is-pressed' )
128
+ . click ( ) ;
126
129
cy . get ( 'button.editor-post-publish-button' ) . click ( ) ;
127
130
cy . wait ( 500 ) ;
128
131
@@ -133,10 +136,11 @@ describe('Block Tests', () => {
133
136
134
137
// Hide groups
135
138
cy . visit ( `/wp-admin/post.php?post=${ postId } &action=edit` ) ;
136
- cy . getBlockEditor ( ) . find ( 'h2[aria-label="Enter a header (optional) "]' ) . click ( ) ;
137
- cy . openDocumentSettingsPanel ( 'Settings' , 'Block' ) ;
138
- cy . get ( '.mailchimp-interest-groups input.components-form-toggle__input ' ) . first ( ) . uncheck ( ) ;
139
+ cy . getBlockEditor ( ) . find ( 'div[data-title="Email Field "]' ) . click ( ) ;
140
+ cy . getBlockEditor ( ) . find ( '.mc_interests_header label' ) . first ( ) . click ( ) ;
141
+ cy . get ( '.block-editor-block-toolbar__slot ' ) . should ( 'be.visible' ) ;
139
142
143
+ cy . get ( '.block-editor-block-toolbar__slot' ) . find ( 'button[aria-label="Visibility"]' ) . click ( ) ;
140
144
cy . get ( 'button.editor-post-publish-button' ) . click ( ) ;
141
145
cy . wait ( 500 ) ;
142
146
0 commit comments