88 fill_in_basic_info ( title : "Very Important Action" ,
99 summary : "A summary" ,
1010 description : "A description" )
11- click_on "Next"
11+ next_section
1212
1313 select_action_type ( "tweet" )
1414 fill_in "Message" , with : "A message"
15- click_on "Next"
15+ next_section
16+
17+ # skip banner selection
18+ next_section
1619
17- skip_image_selection
1820 fill_in_social_media
19- # Skip partners
20- click_on "Next"
2121
2222 tempermental {
2323 click_button "Save"
3030 fill_in_basic_info ( title : "Very Important Action" ,
3131 summary : "A summary" ,
3232 description : "A description" )
33- click_on "Next"
33+ next_section
3434
3535 select_action_type ( "petition" )
3636 fill_in_editor "#action_page_petition_attributes_description" ,
3737 with : "A petititon letter"
3838 fill_in "Goal" , with : 1000
39- click_on "Next"
39+ next_section
40+
41+ # skip banner selection
42+ next_section
4043
41- skip_image_selection
4244 fill_in_social_media
43- # Skip partners
44- click_on "Next"
4545
4646 tempermental {
4747 click_button "Save"
5454 fill_in_basic_info ( title : "Very Important Action" ,
5555 summary : "A summary" ,
5656 description : "A description" )
57- click_on "Next"
57+ next_section
5858
5959 select_action_type ( "email" )
6060 fill_in "To" , with :
"[email protected] " 6161 fill_in "Subject" , with : "Subject"
6262 fill_in "Message" , with : "An email"
63- click_on "Next"
63+ next_section
64+
65+ # skip banner selection
66+ next_section
6467
65- skip_image_selection
6668 fill_in_social_media
67- # Skip partners
68- click_on "Next"
6969
7070 tempermental {
7171 click_button "Save"
7878 fill_in_basic_info ( title : "Very Important Action" ,
7979 summary : "A summary" ,
8080 description : "A description" )
81- click_on "Next"
81+ next_section
8282
8383 select_action_type ( "congress_message" )
8484 fill_in "Subject" , with : "Subject"
8585 fill_in "Message" , with : "A message"
86- click_on "Next"
86+ next_section
87+
88+ # skip banner selection
89+ next_section
8790
88- skip_image_selection
8991 fill_in_social_media
90- # Skip partners
91- click_on "Next"
9292
9393 tempermental {
9494 click_button "Save"
101101 fill_in_basic_info ( title : "Very Important Action" ,
102102 summary : "A summary" ,
103103 description : "A description" )
104- click_on "Next"
104+ next_section
105105
106106 select_action_type "call"
107107 fill_in_editor "#action_page_call_campaign_attributes_message" ,
108108 with : "Call script"
109- click_on "Next"
109+ next_section
110+
111+ # skip banner selection
112+ next_section
110113
111- skip_image_selection
112114 fill_in_social_media
113- # Skip partners
114- click_on "Next"
115115
116116 tempermental {
117117 click_button "Save"
@@ -126,17 +126,15 @@ def fill_in_basic_info(title:, summary:, description:)
126126 fill_in_select2 "#action_page_category_id" , with : category . title
127127 end
128128
129- def skip_image_selection
129+ def next_section
130130 click_on "Next"
131- sleep 0.1
132- click_on "Next"
133- sleep 0.1
131+ sleep 0.05
134132 end
135133
136134 def fill_in_social_media
137135 fill_in "Share Message" , with : "Twitter message"
138136 fill_in "Title" , with : "A social media title"
139- click_on "Next"
137+ next_section
140138 end
141139
142140 def select_action_type ( type )
0 commit comments