@@ -26,7 +26,7 @@ def test_saves_when_only_nested_fields_change
2626 fill_in "API Key Missing" , :with => "hello1: foo\n hello2: bar" , :visible => :all
2727
2828 click_button ( "Save" )
29- assert_content ( "Successfully saved" )
29+ assert_text ( "Successfully saved" )
3030
3131 api = Api . find ( api . id )
3232 assert_equal ( {
@@ -41,14 +41,14 @@ def test_loads_from_server_on_each_load
4141 api = FactoryGirl . create ( :api_with_settings , :name => "Test Load API" , :frontend_host => "example1.com" )
4242 admin_login
4343 visit "/admin/#/apis"
44- assert_content ( "Add API Backend" )
44+ assert_text ( "Add API Backend" )
4545
4646 click_link "Test Load API"
4747 assert_equal ( "example1.com" , find_field ( "Frontend Host" ) . value )
4848
4949 find ( "nav a" , :text => /Configuration/ ) . click
5050 find ( "nav a" , :text => /API Backends/ ) . click
51- assert_content ( "Add API Backend" )
51+ assert_text ( "Add API Backend" )
5252
5353 api . frontend_host = "example2.com"
5454 api . save!
@@ -64,7 +64,7 @@ def test_validation_error_when_all_servers_removed_from_existing_api
6464 find ( "#servers_table a" , :text => /Remove/ ) . click
6565 click_button ( "OK" )
6666 click_button ( "Save" )
67- assert_content ( "Must have at least one servers" )
67+ assert_text ( "Must have at least one servers" )
6868
6969 api = Api . find ( api . id )
7070 assert_equal ( 1 , api . servers . length )
@@ -77,7 +77,7 @@ def test_validation_error_when_all_url_prefixes_removed_from_existing_api
7777 find ( "#url_matches_table a" , :text => /Remove/ ) . click
7878 click_button ( "OK" )
7979 click_button ( "Save" )
80- assert_content ( "Must have at least one url_matches" )
80+ assert_text ( "Must have at least one url_matches" )
8181
8282 api = Api . find ( api . id )
8383 assert_equal ( 1 , api . url_matches . length )
@@ -223,7 +223,7 @@ def test_form
223223 fill_in "HTTPS Required" , :with => "foo6: bar6\n bar6: foo6" , :visible => :all
224224
225225 click_button ( "Save" )
226- assert_content ( "Successfully saved" )
226+ assert_text ( "Successfully saved" )
227227
228228 api = Api . desc ( :created_at ) . first
229229 visit "/admin/#/apis/#{ api . id } /edit"
@@ -369,7 +369,7 @@ def test_edit_custom_rate_limits
369369 end
370370
371371 click_button ( "Save" )
372- assert_content ( "Successfully saved" )
372+ assert_text ( "Successfully saved" )
373373
374374 api . reload
375375
@@ -397,13 +397,13 @@ def test_nested_select_menu_behavior_inside_modals
397397 within ( "#sub_settings_table" ) do
398398 # "any" for the HTTP Method should be shown despite not being explicitly
399399 # selected (since it's the default/first option).
400- assert_content ( "any" )
401- assert_content ( "^/foo.*" )
400+ assert_text ( "any" )
401+ assert_text ( "^/foo.*" )
402402 end
403403
404404 # Save the API.
405405 click_button ( "Save" )
406- assert_content ( "Successfully saved" )
406+ assert_text ( "Successfully saved" )
407407
408408 # Edit again.
409409 click_link api . name
@@ -412,8 +412,8 @@ def test_nested_select_menu_behavior_inside_modals
412412 find ( "legend a" , :text => /Sub-URL Request Settings/ ) . click
413413 assert_selector ( "#sub_settings_table" )
414414 within ( "#sub_settings_table" ) do
415- assert_content ( "any" )
416- assert_content ( "^/foo.*" )
415+ assert_text ( "any" )
416+ assert_text ( "^/foo.*" )
417417 end
418418
419419 # Verify the sub-url setting in the modal and make explicit change the HTTP
@@ -429,13 +429,13 @@ def test_nested_select_menu_behavior_inside_modals
429429 end
430430 assert_selector ( "#sub_settings_table" )
431431 within ( "#sub_settings_table" ) do
432- assert_content ( "OPTIONS" )
433- assert_content ( "^/foo.*" )
432+ assert_text ( "OPTIONS" )
433+ assert_text ( "^/foo.*" )
434434 end
435435
436436 # Save the API.
437437 click_button ( "Save" )
438- assert_content ( "Successfully saved" )
438+ assert_text ( "Successfully saved" )
439439
440440 # Edit again.
441441 click_link api . name
@@ -446,8 +446,8 @@ def test_nested_select_menu_behavior_inside_modals
446446 find ( "legend a" , :text => /Sub-URL Request Settings/ ) . click
447447 assert_selector ( "#sub_settings_table" )
448448 within ( "#sub_settings_table" ) do
449- assert_content ( "OPTIONS" )
450- assert_content ( "^/foo.*" )
449+ assert_text ( "OPTIONS" )
450+ assert_text ( "^/foo.*" )
451451 end
452452 find ( "#sub_settings_table a" , :text => /Edit/ ) . click
453453 assert_selector ( ".modal" )
0 commit comments