Merge branch '12100-cwltool-update' closes #12100
[arvados.git] / apps / workbench / test / integration / report_issue_test.rb
index 7d050f43537680da5b44a166b6901a40cea4baec..dc898689e593b6992707ee6bcbb141f9e3329d5c 100644 (file)
@@ -1,8 +1,12 @@
+# Copyright (C) The Arvados Authors. All rights reserved.
+#
+# SPDX-License-Identifier: AGPL-3.0
+
 require 'integration_helper'
 
 class ReportIssueTest < ActionDispatch::IntegrationTest
   setup do
-    Capybara.current_driver = Capybara.javascript_driver
+    need_javascript
     @user_profile_form_fields = Rails.configuration.user_profile_form_fields
   end
 
@@ -59,6 +63,11 @@ class ReportIssueTest < ActionDispatch::IntegrationTest
       # enter a report text and click on report
       page.find_field('report_issue_text').set 'my test report text'
       assert page.has_button?('Send problem report'), 'Send problem report button not enabled after entering text'
+
+      report = mock
+      report.expects(:deliver).returns true
+      IssueReporter.expects(:send_report).returns report
+
       click_button 'Send problem report'
 
       # ajax success updated button texts and added footer message
@@ -79,7 +88,8 @@ class ReportIssueTest < ActionDispatch::IntegrationTest
     ['active', api_fixture('users')['active']],
     ['admin', api_fixture('users')['admin']],
     ['active_no_prefs', api_fixture('users')['active_no_prefs']],
-    ['active_no_prefs_profile', api_fixture('users')['active_no_prefs_profile']],
+    ['active_no_prefs_profile_no_getting_started_shown',
+        api_fixture('users')['active_no_prefs_profile_no_getting_started_shown']],
   ].each do |token, user|
 
     test "check version info and report issue for user #{token}" do