@@ -113,11 +113,12 @@ def form_config
113113 visit "/example"
114114
115115 fill_in "my-test-input" , with : "bar"
116- click_button "Submit me!"
117116
118117 expect_any_instance_of ( FormTestController ) . to receive ( :expect_params )
119118 . with ( hash_including ( my_object : { foo : "bar" } ) )
120119
120+ click_button "Submit me!"
121+
121122 end
122123
123124 it "Example 2 - Async submit request and clears inputs on success" do
@@ -527,7 +528,7 @@ def form_config
527528 fill_in "password-input" , with : "secret"
528529 fill_in "number-input" , with : 123
529530 fill_in "textarea-input" , with : "Hello \n World!"
530- click_button "Submit me!"
531+
531532
532533 expect_any_instance_of ( FormTestController ) . to receive ( :expect_params )
533534 . with ( hash_including (
@@ -540,6 +541,8 @@ def form_config
540541 }
541542 ) )
542543
544+ click_button "Submit me!"
545+
543546 end
544547
545548 end
@@ -782,11 +785,11 @@ def form_config
782785
783786 select "Array Option 2" , from : "my-array-test-dropdown"
784787 select "Hash Option 2" , from : "my-hash-test-dropdown"
785- click_button "Submit me!"
786788
787789 expect_any_instance_of ( FormTestController ) . to receive ( :expect_params )
788790 . with ( hash_including ( my_object : { array_input : "Array Option 2" , hash_input : "2" } ) )
789791
792+ click_button "Submit me!"
790793 end
791794
792795 it "can be initialized with value" do
@@ -825,11 +828,11 @@ def form_config
825828
826829 select "Array Option 2" , from : "my-array-test-dropdown"
827830 select "Hash Option 2" , from : "my-hash-test-dropdown"
828- click_button "Submit me!"
829831
830832 expect_any_instance_of ( FormTestController ) . to receive ( :expect_params )
831833 . with ( hash_including ( my_object : { array_input : "Array Option 2" , hash_input : "2" } ) )
832834
835+ click_button "Submit me!"
833836 end
834837
835838 it "can be mapped to an Active Record Model Array Enum" do
@@ -1064,11 +1067,12 @@ def form_config
10641067 check "Hash Option 1"
10651068 check "Hash Option 2"
10661069
1067- click_button "Submit me!"
10681070
10691071 expect_any_instance_of ( FormTestController ) . to receive ( :expect_params )
10701072 . with ( hash_including ( my_object : { array_input : [ "Array Option 2" ] , hash_input : [ "1" , "2" ] } ) )
10711073
1074+ click_button "Submit me!"
1075+
10721076 end
10731077
10741078 it "can be initialized by (multiple) item(s)" do
@@ -1102,10 +1106,11 @@ def form_config
11021106
11031107 visit "/example"
11041108
1105- click_button "Submit me!"
11061109
11071110 expect_any_instance_of ( FormTestController ) . to receive ( :expect_params )
11081111 . with ( hash_including ( my_object : { array_input : [ "Array Option 1" , "Array Option 2" ] , hash_input : [ "2" ] } ) )
1112+
1113+ click_button "Submit me!"
11091114
11101115 end
11111116
@@ -1231,11 +1236,11 @@ def form_config
12311236 choose ( 'Array Option 2' )
12321237 choose ( 'Hash Option 1' )
12331238
1234- click_button "Submit me!"
12351239
12361240 expect_any_instance_of ( FormTestController ) . to receive ( :expect_params )
12371241 . with ( hash_including ( my_object : { array_input : "Array Option 2" , hash_input : "1" } ) )
12381242
1243+ click_button "Submit me!"
12391244 end
12401245
12411246 it "can be initialized by (multiple) item(s)" do
@@ -1274,11 +1279,11 @@ def form_config
12741279 expect ( page ) . to have_field ( 'Hash Option 1' , checked : false )
12751280 expect ( page ) . to have_field ( 'Hash Option 2' , checked : true )
12761281
1277- click_button "Submit me!"
12781282
12791283 expect_any_instance_of ( FormTestController ) . to receive ( :expect_params )
12801284 . with ( hash_including ( my_object : { array_input : "Array Option 1" , hash_input : "2" } ) )
12811285
1286+ click_button "Submit me!"
12821287 end
12831288
12841289 it "can be mapped to an Active Record Model Array Enum" do
@@ -1606,11 +1611,11 @@ def response
16061611 visit "/example"
16071612
16081613 fill_in "my-test-input" , with : "bar"
1609- click_button "Submit me!"
16101614
16111615 expect_any_instance_of ( FormTestController ) . to receive ( :expect_params )
16121616 . with ( hash_including ( my_object : { foo : "bar" } ) )
16131617
1618+ click_button "Submit me!"
16141619 end
16151620 end
16161621
0 commit comments