File tree Expand file tree Collapse file tree 2 files changed +6
-12
lines changed Expand file tree Collapse file tree 2 files changed +6
-12
lines changed Original file line number Diff line number Diff line change 3
3
4
4
npm run env run tests-wordpress chmod -- -c ugo+w /var/www/html
5
5
npm run env run tests-cli wp rewrite structure ' /%postname%/' -- --hard
6
+
7
+ wp-env run tests-cli wp post create --post_title=' Mailchimp signup form – shortcode' --post_type=page --post_status=publish --post_author=1 --post_content=' <!-- wp:shortcode -->[mailchimpsf_form]<!-- /wp:shortcode -->'
8
+ wp-env run tests-cli wp post create --post_title=' Mailchimp signup form - Block' --post_type=page --post_status=publish --post_author=1 --post_content=' <!-- wp:mailchimp/mailchimp /-->'
Original file line number Diff line number Diff line change 2
2
import { generateRandomEmail } from '../../support/functions/utility' ;
3
3
4
4
describe ( 'Subscribe actions' , ( ) => {
5
- let shortcodePostURL ;
6
- let blockPostPostURL ;
7
-
8
5
before ( ( ) => {
9
- // Load the post URLs from the JSON file
10
- cy . fixture ( 'postUrls' ) . then ( ( urls ) => {
11
- shortcodePostURL = urls . shortcodePostURL ;
12
- blockPostPostURL = urls . blockPostPostURL ;
13
- } ) ;
14
-
15
6
cy . login ( ) ; // WP
16
7
cy . mailchimpLoginIfNotAlreadyLoggedIn ( ) ;
17
8
@@ -70,7 +61,7 @@ describe('Subscribe actions', () => {
70
61
// Step 2: Create the post
71
62
cy . createPost ( { title : postTitle , content : '' , beforeSave } ) . then ( ( post ) => {
72
63
if ( post ) {
73
- shortcodePostURL = `/?p=${ post . id } ` ;
64
+ const shortcodePostURL = `/?p=${ post . id } ` ;
74
65
signUpAndVerify ( shortcodePostURL ) ;
75
66
}
76
67
} ) ;
@@ -87,9 +78,9 @@ describe('Subscribe actions', () => {
87
78
// Step 2: Create the post
88
79
cy . createPost ( { title : postTitle , content : '' , beforeSave } ) . then ( ( postBlock ) => {
89
80
if ( postBlock ) {
90
- blockPostPostURL = `/?p=${ postBlock . id } ` ;
81
+ const blockPostPostURL = `/?p=${ postBlock . id } ` ;
91
82
signUpAndVerify ( blockPostPostURL ) ;
92
83
}
93
84
} ) ;
94
85
} ) ;
95
- } ) ;
86
+ } ) ;
You can’t perform that action at this time.
0 commit comments