3112: minor label updates
authorradhika <radhika@curoverse.com>
Thu, 14 Aug 2014 20:07:15 +0000 (16:07 -0400)
committerradhika <radhika@curoverse.com>
Thu, 14 Aug 2014 20:07:15 +0000 (16:07 -0400)
apps/workbench/app/controllers/actions_controller.rb
apps/workbench/app/views/application/_report_issue_popup.html.erb
apps/workbench/app/views/application/report_issue_popup.js.erb
apps/workbench/app/views/issue_reporter/send_report.text.erb
apps/workbench/test/functional/actions_controller_test.rb
apps/workbench/test/integration/application_layout_test.rb

index e7feb25894d1a13675a17cac6f327d0e1d9392b0..695f7703204dfdaf7eb306a77ab0eb14d8008340 100644 (file)
@@ -186,7 +186,7 @@ class ActionsController < ApplicationController
   end
 
   def report_issue
-    puts "Issue being reported with these parameters: #{params.inspect}"
+    $stderr.puts "Issue being reported with these parameters: #{params.inspect}"
     logger.warn "Issue being reported with these parameters: #{params.inspect}"
 
     respond_to do |format|
index e569933c56f0a093faa3f4bbe1bb1555ee2dd2e4..31c76d09d9dedb545e7184b3c8b8e8524961c08f 100644 (file)
@@ -82,7 +82,7 @@
           <div class="form-group">
             <label for="report_text_label" class="col-sm-4 control-label"> Found a problem? Tell us what happened </label>
             <div class="col-sm-8">
-              <textarea class="form-control" rows="1" name="report_text" type="text"/>
+              <textarea class="form-control" rows="1" id="report_issue_text" name="report_issue_text" type="text"/>
             </div>
           </div>
         <% end %>
index 513bf7db6593badb28954be9e90cf55324cc1665..59aedbcf6e585484983715753f55596f97df08e4 100644 (file)
@@ -2,6 +2,6 @@ $("#report-issue-modal-window").html("<%= escape_javascript(render partial: 'rep
 
 // reset form input fields, for the next time around
 function reset_form() {
-  $('#report_text').val("");
+  $('#report_issue_text').val("");
   $('#additional_info').val("");
 }
index 466d0915b650137005d5ed088a972683a10fba24..4cbb371ca1d0c4911cb53f5841698598c9af586a 100644 (file)
@@ -5,7 +5,9 @@ Issue reported
 <% end %>
 
 Details of the report:
+<% if @params['report_additional_info'] %>
 <% json_map = JSON.parse(@params['report_additional_info']).map %>
 <%  map_to_s = json_map.map {|k,v| "#{k}=#{v}"}.join("\n") %>
 <%= map_to_s %>
-Report text=<%=@params['report_text'] %>
+<% end %>
+Report text=<%=@params['report_issue_text'] %>
index f3c7b7482b9550d5bbc67cadfea207d46529de73..965453841f7417b60d79860d4e070fc2447b5069 100644 (file)
@@ -8,7 +8,7 @@ class ActionsControllerTest < ActionController::TestCase
 
     found_email = false
     ActionMailer::Base.deliveries.andand.each do |email|
-      if email.subject == "Issue reported"
+      if email.subject.include? "Issue reported by admin"
         found_email = true
         break
       end
index 990bd7b8f2be88af269b8a0c2e994e266c0c0823..a4b30f232bf9f26b5d62e884ce8e50d3747abed9 100644 (file)
@@ -87,7 +87,7 @@ 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'
@@ -109,13 +109,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_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
 
@@ -280,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