@@ -46,6 +46,150 @@ Object {
4646}
4747` ;
4848
49+ exports[` Automations API edit edits automation status , ignoring name , actions and edges 1 : [body ] 1 ` ] = `
50+ Object {
51+ " automations" : Array [
52+ Object {
53+ " actions" : Array [
54+ Object {
55+ " data" : Object {
56+ " wait_hours" : 48 ,
57+ },
58+ " id" : StringMatching / \\[a - f0 - 9 \\]\\{24\\}/ ,
59+ " type" : " wait" ,
60+ },
61+ Object {
62+ " data" : Object {
63+ " email_design_setting_id" : StringMatching / \\[a - f0 - 9 \\]\\{24\\}/ ,
64+ " email_lexical" : " {\\ " root \\" :{\\ " children \\" :[{\\ " type \\" :\\ " paragraph \\" ,\\ " children \\" :[{\\ " type \\" :\\ " text \\" ,\\ " text \\" :\\ " Lorem ipsum .\\" }]}],\\ " direction \\" :null,\\ " format \\" :\\ " \\" ,\\ " indent \\" :0,\\ " type \\" :\\ " root \\" ,\\ " version \\" :1}}" ,
65+ " email_sender_email" : null ,
66+ " email_sender_name" : null ,
67+ " email_sender_reply_to" : null ,
68+ " email_subject" : " Welcome!" ,
69+ },
70+ " id" : StringMatching / \\[a - f0 - 9 \\]\\{24\\}/ ,
71+ " type" : " send_email" ,
72+ },
73+ Object {
74+ " data" : Object {
75+ " wait_hours" : 72 ,
76+ },
77+ " id" : StringMatching / \\[a - f0 - 9 \\]\\{24\\}/ ,
78+ " type" : " wait" ,
79+ },
80+ Object {
81+ " data" : Object {
82+ " email_design_setting_id" : StringMatching / \\[a - f0 - 9 \\]\\{24\\}/ ,
83+ " email_lexical" : " {\\ " root \\" :{\\ " children \\" :[{\\ " type \\" :\\ " paragraph \\" ,\\ " children \\" :[{\\ " type \\" :\\ " text \\" ,\\ " text \\" :\\ " Lorem ipsum .\\" }]}],\\ " direction \\" :null,\\ " format \\" :\\ " \\" ,\\ " indent \\" :0,\\ " type \\" :\\ " root \\" ,\\ " version \\" :1}}" ,
84+ " email_sender_email" : null ,
85+ " email_sender_name" : null ,
86+ " email_sender_reply_to" : null ,
87+ " email_subject" : " Follow up" ,
88+ },
89+ " id" : StringMatching / \\[a - f0 - 9 \\]\\{24\\}/ ,
90+ " type" : " send_email" ,
91+ },
92+ ],
93+ " created_at" : StringMatching / \\\\d \\{4\\}- \\\\d \\{2\\}- \\\\d \\{2\\}T \\\\d \\{2\\}:\\\\d \\{2\\}:\\\\d \\{2\\}\\\\\\.000Z / ,
94+ " edges" : Array [
95+ Object {
96+ " source_action_id" : StringMatching / \\[a - f0 - 9 \\]\\{24\\}/ ,
97+ " target_action_id" : StringMatching / \\[a - f0 - 9 \\]\\{24\\}/ ,
98+ },
99+ Object {
100+ " source_action_id" : StringMatching / \\[a - f0 - 9 \\]\\{24\\}/ ,
101+ " target_action_id" : StringMatching / \\[a - f0 - 9 \\]\\{24\\}/ ,
102+ },
103+ Object {
104+ " source_action_id" : StringMatching / \\[a - f0 - 9 \\]\\{24\\}/ ,
105+ " target_action_id" : StringMatching / \\[a - f0 - 9 \\]\\{24\\}/ ,
106+ },
107+ ],
108+ " id" : StringMatching / \\[a - f0 - 9 \\]\\{24\\}/ ,
109+ " name" : " Welcome Email (Free)" ,
110+ " slug" : " member-welcome-email-free" ,
111+ " status" : " inactive" ,
112+ " updated_at" : StringMatching / \\\\d \\{4\\}- \\\\d \\{2\\}- \\\\d \\{2\\}T \\\\d \\{2\\}:\\\\d \\{2\\}:\\\\d \\{2\\}\\\\\\.000Z / ,
113+ },
114+ ],
115+ }
116+ ` ;
117+
118+ exports[` Automations API edit edits automation status , ignoring name , actions and edges 2 : [headers ] 1 ` ] = `
119+ Object {
120+ " access-control-allow-origin" : " http://127.0.0.1:2369" ,
121+ " cache-control" : " no-cache, private, no-store, must-revalidate, max-stale=0, post-check=0, pre-check=0" ,
122+ " content-length" : StringMatching / \\\\d \\+/ ,
123+ " content-type" : " application/json; charset=utf-8" ,
124+ " content-version" : StringMatching / v \\\\d \\+ \\\\\\.\\\\d \\+/ ,
125+ " etag" : StringMatching / \\(\\?: W \\\\/ \\ )\\ ? "\\ (\\ ? :\\ [ !#-\\ \\ x7E\\\\ x80-\\ \\ xFF\\ ] \\ * \\ | \\\\ r\\\\ n\\ [\\\\ t \\ ] \\ | \\\\\\\\\\ . \\ )\\ * "/ ,
126+ " vary" : " Accept-Version, Origin, Accept-Encoding" ,
127+ " x-powered-by" : " Express" ,
128+ }
129+ ` ;
130+
131+ exports[` Automations API edit rejects a missing automation status 1 : [body ] 1 ` ] = `
132+ Object {
133+ " errors" : Array [
134+ Object {
135+ " code" : null ,
136+ " context" : " Automation status must be one of: active, inactive." ,
137+ " details" : null ,
138+ " ghostErrorCode" : null ,
139+ " help" : " Use \\ " active \\" or \\ " inactive \\" for automation status." ,
140+ " id" : StringMatching / \\[a - f0 - 9 \\]\\{8\\}- \\[a - f0 - 9 \\]\\{4\\}- \\[a - f0 - 9 \\]\\{4\\}- \\[a - f0 - 9 \\]\\{4\\}- \\[a - f0 - 9 \\]\\{12\\}/ ,
141+ " message" : " Validation error, cannot edit automation." ,
142+ " property" : " status" ,
143+ " type" : " ValidationError" ,
144+ },
145+ ],
146+ }
147+ ` ;
148+
149+ exports[` Automations API edit rejects a missing automation status 2 : [headers ] 1 ` ] = `
150+ Object {
151+ " access-control-allow-origin" : " http://127.0.0.1:2369" ,
152+ " cache-control" : " no-cache, private, no-store, must-revalidate, max-stale=0, post-check=0, pre-check=0" ,
153+ " content-length" : " 333" ,
154+ " content-type" : " application/json; charset=utf-8" ,
155+ " content-version" : StringMatching / v \\\\d \\+ \\\\\\.\\\\d \\+/ ,
156+ " etag" : StringMatching / \\(\\?: W \\\\/ \\ )\\ ? "\\ (\\ ? :\\ [ !#-\\ \\ x7E\\\\ x80-\\ \\ xFF\\ ] \\ * \\ | \\\\ r\\\\ n\\ [\\\\ t \\ ] \\ | \\\\\\\\\\ . \\ )\\ * "/ ,
157+ " vary" : " Accept-Version, Origin, Accept-Encoding" ,
158+ " x-powered-by" : " Express" ,
159+ }
160+ ` ;
161+
162+ exports[` Automations API edit rejects an invalid automation status 1 : [body ] 1 ` ] = `
163+ Object {
164+ " errors" : Array [
165+ Object {
166+ " code" : null ,
167+ " context" : " Automation status must be one of: active, inactive. Received status \\ " paused \\" ." ,
168+ " details" : null ,
169+ " ghostErrorCode" : null ,
170+ " help" : " Use \\ " active \\" or \\ " inactive \\" for automation status." ,
171+ " id" : StringMatching / \\[a - f0 - 9 \\]\\{8\\}- \\[a - f0 - 9 \\]\\{4\\}- \\[a - f0 - 9 \\]\\{4\\}- \\[a - f0 - 9 \\]\\{4\\}- \\[a - f0 - 9 \\]\\{12\\}/ ,
172+ " message" : " Validation error, cannot edit automation." ,
173+ " property" : " status" ,
174+ " type" : " ValidationError" ,
175+ },
176+ ],
177+ }
178+ ` ;
179+
180+ exports[` Automations API edit rejects an invalid automation status 2 : [headers ] 1 ` ] = `
181+ Object {
182+ " access-control-allow-origin" : " http://127.0.0.1:2369" ,
183+ " cache-control" : " no-cache, private, no-store, must-revalidate, max-stale=0, post-check=0, pre-check=0" ,
184+ " content-length" : " 361" ,
185+ " content-type" : " application/json; charset=utf-8" ,
186+ " content-version" : StringMatching / v \\\\d \\+ \\\\\\.\\\\d \\+/ ,
187+ " etag" : StringMatching / \\(\\?: W \\\\/ \\ )\\ ? "\\ (\\ ? :\\ [ !#-\\ \\ x7E\\\\ x80-\\ \\ xFF\\ ] \\ * \\ | \\\\ r\\\\ n\\ [\\\\ t \\ ] \\ | \\\\\\\\\\ . \\ )\\ * "/ ,
188+ " vary" : " Accept-Version, Origin, Accept-Encoding" ,
189+ " x-powered-by" : " Express" ,
190+ }
191+ ` ;
192+
49193exports[` Automations API poll does not poll when request lacks a token 1 : [body ] 1 ` ] = `
50194Object {
51195 " errors" : Array [
0 commit comments