3112: improve errors test to exercise the report issue button.
[arvados.git] / apps / workbench / test / integration / application_layout_test.rb
index 9b1085a327187c2bfd38e05a842bec126b36548c..a4b30f232bf9f26b5d62e884ce8e50d3747abed9 100644 (file)
@@ -64,7 +64,7 @@ class ApplicationLayoutTest < ActionDispatch::IntegrationTest
   end
 
   # test the help menu
-  def check_help_menu user
+  def check_help_menu
     within('.navbar-fixed-top') do
       page.find("#arv-help").click
       within('.dropdown-menu') do
@@ -74,12 +74,11 @@ class ApplicationLayoutTest < ActionDispatch::IntegrationTest
         assert page.has_link? 'Show version / debugging info'
         assert page.has_link? 'Report a problem'
 
-        # check show version info link      
+        # check show version info link
         click_link 'Show version / debugging info'
       end
     end
 
-    if user && user['is_active']  # TBD - no user as well as inactive user also should be able to report issue
     within '.modal-content' do
       assert page.has_text? 'Version / debugging info'
       assert page.has_no_text? 'Report a problem'
@@ -88,13 +87,13 @@ class ApplicationLayoutTest < ActionDispatch::IntegrationTest
       assert page.has_text? 'Workbench version'
       assert page.has_text? 'Arvados base'
       assert page.has_text? 'Additional info'
-      assert page.has_no_text? 'Report text'
+      assert page.has_no_text? 'Found a problem?'
       assert page.has_button? 'Close'
       assert page.has_no_button? 'Report issue'
       click_button 'Close'
     end
 
-    # check report issue link      
+    # check report issue link
     within('.navbar-fixed-top') do
       page.find("#arv-help").click
       within('.dropdown-menu') do
@@ -110,16 +109,15 @@ class ApplicationLayoutTest < ActionDispatch::IntegrationTest
       assert page.has_text? 'Workbench version'
       assert page.has_text? 'Arvados base'
       assert page.has_text? 'Additional info'
-      assert page.has_text? 'Report text'
+      assert page.has_text? 'Found a problem?'
       assert page.has_no_button? 'Close'
       assert page.has_button? 'Report issue'
       assert page.has_button? 'Cancel'
 
       # enter a report text and click on report
-      page.find_field('report_text').set 'my test report text'
+      page.find_field('report_issue_text').set 'my test report text'
       click_button 'Report issue'
     end
-    end   # TBD - when no user and inactive user work, this should go away
 
     assert page.has_no_text? 'Version / debugging info'
   end
@@ -282,12 +280,12 @@ class ApplicationLayoutTest < ActionDispatch::IntegrationTest
         assert page.has_no_text? 'Version / debugging info'
         assert page.has_text? 'Server version'
         assert page.has_text? 'Server restarted at'
-        assert page.has_text? 'Report text'
+        assert page.has_text? 'Found a problem?'
         assert page.has_button? 'Report issue'
         assert page.has_button? 'Cancel'
 
         # enter a report text and click on report
-        page.find_field('report_text').set 'my test report text'
+        page.find_field('report_issue_text').set 'my test report text'
         click_button 'Report issue'
       end
 
@@ -356,7 +354,7 @@ class ApplicationLayoutTest < ActionDispatch::IntegrationTest
         visit page_with_token(token)
       end
 
-      check_help_menu user
+      check_help_menu
     end
 
   end