6652: Added assertion and changed assertion to use assert_text instead
authorManoj <jonam33@gmail.com>
Wed, 19 Aug 2015 13:19:40 +0000 (09:19 -0400)
committerManoj <jonam33@gmail.com>
Wed, 19 Aug 2015 13:19:40 +0000 (09:19 -0400)
of page.has_text?.

apps/workbench/test/integration/application_layout_test.rb

index 429e811a8c50bf7a78cd0ad7688dae4f2085951c..ba36220717aab92d0cd879a16fbabd7d2e11f5ce 100644 (file)
@@ -240,10 +240,12 @@ class ApplicationLayoutTest < ActionDispatch::IntegrationTest
       if add_button_text
         assert_selector 'button', text: "Add a new #{add_button_text}"
         find('button', text: "Add a new #{add_button_text}").click
+      else
+        assert_no_selector 'button', text:"Add a new"
       end
 
       # look for unique property in the current page
-      assert page.has_text? look_for
+      assert_text look_for
     end
   end
 end