[ARVADOS] updated: e824ef364a6efd3c02bce159973f4098d794865c

git at public.curoverse.com git at public.curoverse.com
Wed Aug 20 10:51:29 EDT 2014


Summary of changes:
 .../app/assets/javascripts/user_agreements.js      |   9 ++
 .../app/assets/stylesheets/application.css.scss    |   4 -
 .../app/controllers/actions_controller.rb          |   1 +
 .../app/controllers/application_controller.rb      |  50 ++++----
 .../app/controllers/collections_controller.rb      |   3 +-
 apps/workbench/app/controllers/users_controller.rb |  30 ++++-
 apps/workbench/app/views/collections/show.html.erb |  19 +++
 apps/workbench/app/views/projects/_choose.html.erb |   2 +-
 .../app/views/user_agreements/index.html.erb       |  22 +---
 apps/workbench/app/views/users/inactive.html.erb   |   4 +
 apps/workbench/app/views/users/profile.html.erb    |  31 ++---
 apps/workbench/config/application.default.yml      |   6 +-
 apps/workbench/config/routes.rb                    |   1 +
 .../test/functional/collections_controller_test.rb |   2 +-
 .../test/functional/projects_controller_test.rb    |  19 ++-
 .../test/functional/users_controller_test.rb       |   6 +
 .../test/integration/application_layout_test.rb    | 142 +--------------------
 .../workbench/test/integration/collections_test.rb |  24 ++--
 .../test/integration/report_issue_test.rb          | 106 +++++++++++++++
 apps/workbench/test/integration/search_box_test.rb |  97 ++++++++++++++
 sdk/python/arvados/api.py                          | 132 ++++++++++++-------
 sdk/python/arvados/collection.py                   |  13 +-
 sdk/python/arvados/commands/put.py                 |   1 -
 sdk/python/bin/arv-get                             |  21 +--
 sdk/python/tests/test_api.py                       |  21 +--
 services/api/app/models/user.rb                    |  50 +++-----
 .../functional/arvados/v1/users_controller_test.rb |   8 ++
 27 files changed, 487 insertions(+), 337 deletions(-)
 create mode 100644 apps/workbench/app/assets/javascripts/user_agreements.js
 create mode 100644 apps/workbench/test/integration/report_issue_test.rb
 create mode 100644 apps/workbench/test/integration/search_box_test.rb

       via  e824ef364a6efd3c02bce159973f4098d794865c (commit)
       via  6b0ad588b44ee30cd400e85031b56dcb2a8ac567 (commit)
       via  2509f755a36b2fc944689d5a1ea62729d4d6c3a5 (commit)
       via  903e49f38401ed6113f4e0ec159db8750d4db2ba (commit)
       via  d81ea65da05119d5c6480d373b5d42bbee8ae1ad (commit)
       via  301abeabd5472bdf5795ff42775be325c774c7cc (commit)
       via  f7768d3dbc6e4c4fa56cbe4906d6682120b8daa3 (commit)
       via  8917fa82999bdf0020f623db9869abae99930b56 (commit)
       via  47dc22e10fe234df3da76abdb9e704b01d57427d (commit)
       via  aa2adbcaa06c4f5dc7a6e54f3d9a5148b20fbbb1 (commit)
       via  1e368708ad2a2d553f5e716c473767c660b2f805 (commit)
       via  2e89fc72d3ad55169dbc1acf38cf040592bf25e5 (commit)
       via  f6634dddac1489a463a5eba713a0908a9c72e212 (commit)
       via  5b43256cd7462b92ed91bceaa1c864c1db2d400a (commit)
       via  accaf5ae43696ec8462e0f204a41125e14cefbc0 (commit)
       via  3bd1f8dad3a4c9abd6130c66a4cefc973398a09d (commit)
       via  1cf34cb15ce0d6885af6132196b43602c7d741d1 (commit)
       via  e14050324bb2bf7a10be5f23554036d191352a09 (commit)
       via  00dd253443e7f7a94bdea1a349627ebd95f296fd (commit)
       via  c4c188cdbe17d2fdfd6f14c0181876a78a2d4b2e (commit)
       via  199e61ebf83ae9ee11d8da46adb4a8897d885504 (commit)
       via  7d258618cbfa7b071d81b6bf7fa18c344d2b5f87 (commit)
       via  e7b360fd7acfaa3428b774389baf9626f7ff026c (commit)
       via  cf233d57cea2795891a40d4ecd2fdde492ab87b3 (commit)
       via  59522bd2b1a628e090d89f71d491b76a0047fdf5 (commit)
       via  201663b6f49d3f1fa95a574dccdbf63c500d59d4 (commit)
       via  ff024b6b09112e89205d01370cdab19b49d6bd50 (commit)
       via  8221eaf272a7781af6ccc5672e8bfba54283fe43 (commit)
       via  1293b79e382a0e256818c06ad7c1d5a10ff20bb5 (commit)
       via  c5f8a89d3b0a8038a31b0af049f3610b6374b6a8 (commit)
       via  2024ca087c3b9c99ebb792011b60fecdf1486467 (commit)
       via  0bd1c28bed9a0756c61037947d5a9dccd5066f00 (commit)
       via  7485476596408f9611d59e88bf78a66431460b4c (commit)
       via  edebf116a9f743a7a276d514c4cbad72c3406922 (commit)
       via  ea2fecde7e80f9d6c493bcb1bf2b7ee25fd96b12 (commit)
       via  4eae62369588616d8833010c5febc939a4820cf0 (commit)
       via  ac30c34ccfacce16cca52e155d2a0e50b0185dc3 (commit)
       via  36c360770c7925509552cfe8c3d8bf64fe1c2644 (commit)
       via  c6db15d0529212126920002665c9c99a4f864529 (commit)
      from  a9170bf25717112dee4c42b095865fcbe5794e70 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.


commit e824ef364a6efd3c02bce159973f4098d794865c
Merge: a9170bf 6b0ad58
Author: radhika <radhika at curoverse.com>
Date:   Wed Aug 20 10:31:50 2014 -0400

    Merge branch 'master' into 3112-report-bug. Also, break search testing into a separate project.
    
    Conflicts:
    	apps/workbench/app/controllers/application_controller.rb
    	apps/workbench/config/application.default.yml
    	apps/workbench/test/integration/application_layout_test.rb

diff --cc apps/workbench/app/controllers/application_controller.rb
index a913d8a,5c99c15..20dea38
--- a/apps/workbench/app/controllers/application_controller.rb
+++ b/apps/workbench/app/controllers/application_controller.rb
@@@ -11,10 -11,10 +11,10 @@@ class ApplicationController < ActionCon
    around_filter :set_thread_api_token
    # Methods that don't require login should
    #   skip_around_filter :require_thread_api_token
 -  around_filter :require_thread_api_token, except: ERROR_ACTIONS
 +  around_filter :require_thread_api_token, except: [:report_issue_popup, :report_issue] + ERROR_ACTIONS
    before_filter :accept_uuid_as_id_param, except: ERROR_ACTIONS
 -  before_filter :check_user_agreements, except: ERROR_ACTIONS
 +  before_filter :check_user_agreements, except: [:report_issue_popup, :report_issue] + ERROR_ACTIONS
-   before_filter :check_user_profile, except: [:update_profile] + ERROR_ACTIONS
+   before_filter :check_user_profile, except: ERROR_ACTIONS
    before_filter :check_user_notifications, except: ERROR_ACTIONS
    before_filter :load_filters_and_paging_params, except: ERROR_ACTIONS
    before_filter :find_object_by_uuid, except: [:index, :choose] + ERROR_ACTIONS
diff --cc apps/workbench/config/application.default.yml
index 13829b6,9443520..042f869
--- a/apps/workbench/config/application.default.yml
+++ b/apps/workbench/config/application.default.yml
@@@ -129,15 -128,6 +129,15 @@@ common
    #      - IT
    #      - Other
  
-   # Use "user_profile_form_message" to configure the message you want to display in
-   # the profile page. If this is not provided, a default message will be displayed.
-   user_profile_form_message: Welcome to Arvados. Please fill in all required fields before you can access Arvados Workbench. Missing required fields are in <span style="color:red">red</span>.
+   # Use "user_profile_form_message" to configure the message you want to display on
+   # the profile page.
+   user_profile_form_message: Welcome to Arvados. All <span style="color:red">required fields</span> must be completed before you can proceed.
 +
 +  # source_version
 +  source_version: <%= `git log -n 1 --format=%h` %>
 +  local_modified: false
 +
 +  # report nitification to and from addresses
 +  report_notifier_email_from: arvados at example.com
 +  report_notifier_email_to: arvados at example.com
 +  support_email_address: arvados at example.com
diff --cc apps/workbench/test/integration/application_layout_test.rb
index 78ed236,19bb4c1..fa6793d
--- a/apps/workbench/test/integration/application_layout_test.rb
+++ b/apps/workbench/test/integration/application_layout_test.rb
@@@ -68,65 -68,11 +68,14 @@@ class ApplicationLayoutTest < ActionDis
      within('.navbar-fixed-top') do
        page.find("#arv-help").click
        within('.dropdown-menu') do
 -        assert page.has_link? 'Tutorials and User guide'
 -        assert page.has_link? 'API Reference'
 -        assert page.has_link? 'SDK Reference'
 +        assert page.has_link?('Tutorials and User guide'), 'No link - Tutorials and User guide'
 +        assert page.has_link?('API Reference'), 'No link - API Reference'
 +        assert page.has_link?('SDK Reference'), 'No link - SDK Reference'
 +        assert page.has_link?('Show version / debugging info'), 'No link - Show version / debugging info'
 +        assert page.has_link?('Report a problem'), 'No link - Report a problem'
- 
-         # check show version info link
-         click_link 'Show version / debugging info'
-       end
-     end
- 
-     within '.modal-content' do
-       assert page.has_text?('Version / debugging info'), 'No text - Version / debugging info'
-       assert page.has_no_text?('Report a problem'), 'Found text - Report a problem'
-       assert page.has_text?('Server version'), 'No text - Server version'
-       assert page.has_text?('Server restarted at'), 'No text - Server restarted at'
-       assert page.has_text?('Workbench version'), 'No text - Workbench version'
-       assert page.has_text?('Arvados base'), 'No text - Arvados base'
-       assert page.has_text?('Additional info'), 'No text - Additional info'
-       assert page.has_no_text?('Found a problem?'), 'Found text - Found a problem'
-       assert page.has_button?('Close'), 'No button - Close'
-       assert page.has_no_button?('Report issue'), 'Found button - Report issue'
-       click_button 'Close'
-     end
- 
-     # check report issue link
-     within('.navbar-fixed-top') do
-       page.find("#arv-help").click
-       within('.dropdown-menu') do
-         click_link 'Report a problem'
++        # Version info and Report a problem are tested in "report_issue_test.rb"
        end
      end
- 
-     within '.modal-content' do
-       assert page.has_text?('Report a problem'), 'No text - Report a problem'
-       assert page.has_no_text?('Version / debugging info'), 'Found text - Version / debugging info'
-       assert page.has_text?('Server version'), 'No text - Server version'
-       assert page.has_text?('Server restarted at'), 'No text - Server restarted at'
-       assert page.has_text?('Workbench version'), 'No text - Workbench version'
-       assert page.has_text?('Arvados base'), 'No text - Arvados base'
-       assert page.has_text?('Additional info'), 'No text - Additional info'
-       assert page.has_text?('Found a problem?'), 'No text - Found a problem'
-       assert page.has_no_button?('Close'), 'Found button - Close'
-       assert page.has_button?('Report issue'), 'No button - Report issue'
-       assert page.has_button?('Cancel'), 'No button - Cancel'
- 
-       # enter a report text and click on report
-       page.find_field('report_issue_text').set 'my test report text'
-       click_button 'Report issue'
- 
-       # ajax success updated button texts and added footer message
-       assert page.has_no_button?('Report issue'), 'Found button - Report issue'
-       assert page.has_no_button?('Cancel'), 'Found button - Cancel'
-       assert page.has_text?('Report sent'), 'No text - Report sent'
-       assert page.has_button?('Close'), 'No text - Close'
-       assert page.has_text?('Thanks for reporting this issue'), 'No text - Thanks for reporting this issue'
- 
-       click_button 'Close'
-     end
    end
  
    def verify_system_menu user
@@@ -244,92 -190,68 +193,21 @@@
        end
      end
  
-     assert page.has_text?(profile_message[0,25]), 'No text - configured profile message'
+     assert page.has_text? profile_message.gsub(/<.*?>/,'')
 -    assert page.has_text? required_field_title
 +    assert page.has_text?(required_field_title), 'No text - configured required field title'
++
      page.find_field('user[prefs][:profile][:'+required_field_key+']').set 'value to fill required field'
  
      click_button "Save profile"
      # profile saved and in profile page now with success
 -    assert page.has_text? 'Thank you for filling in your profile'
 -    click_link 'Back to work'
 +    assert page.has_text?('Thank you for filling in your profile'), 'No text - Thank you for filling'
-     click_button 'Access Arvados Workbench'
++    click_link 'Back to work!'
  
      # profile saved and in home page now
 -    assert page.has_text? 'My projects'
 -    assert page.has_text? 'Projects shared with me'
 -  end
 -
 -  # test the search box
 -  def verify_search_box user
 -    if user && user['is_active']
 -      # let's search for a valid uuid
 -      within('.navbar-fixed-top') do
 -        page.find_field('search').set user['uuid']
 -        page.find('.glyphicon-search').click
 -      end
 -
 -      # we should now be in the user's home project as a result of search
 -      assert_selector "#Data_collections[data-object-uuid='#{user['uuid']}']"
 -
 -      # let's search again for an invalid valid uuid
 -      within('.navbar-fixed-top') do
 -        search_for = String.new user['uuid']
 -        search_for[0]='1'
 -        page.find_field('search').set search_for
 -        page.find('.glyphicon-search').click
 -      end
 -
 -      # we should see 'not found' error page
 -      assert page.has_text? 'Not Found'
 -
 -      # let's search for the anonymously accessible project
 -      publicly_accessible_project = api_fixture('groups')['anonymously_accessible_project']
 -
 -      within('.navbar-fixed-top') do
 -        # search again for the anonymously accessible project
 -        page.find_field('search').set publicly_accessible_project['name'][0,10]
 -        page.find('.glyphicon-search').click
 -      end
 -
 -      within '.modal-content' do
 -        assert page.has_text? 'All projects'
 -        assert page.has_text? 'Search'
 -        assert page.has_text? 'Cancel'
 -        assert_selector('div', text: publicly_accessible_project['name'])
 -        find(:xpath, '//div[./span[contains(.,publicly_accessible_project["uuid"])]]').click
 -
 -        click_button 'Show'
 -      end
 -
 -      # seeing "Unrestricted public data" now
 -      assert page.has_text? publicly_accessible_project['name']
 -      assert page.has_text? publicly_accessible_project['description']
 -    end
 +    assert page.has_text?('My projects'), 'No text - My projects'
 +    assert page.has_text?('Projects shared with me'), 'No text - Projects shared with me'
    end
  
-   # test the search box
-   def verify_search_box user
-     if user && user['is_active']
-       # let's search for a valid uuid
-       within('.navbar-fixed-top') do
-         page.find_field('search').set user['uuid']
-         page.find('.glyphicon-search').click
-       end
- 
-       # we should now be in the user's page as a result of search
-       assert page.has_text?(user['first_name']), 'No text - user first name'
- 
-       # let's search again for an invalid valid uuid
-       within('.navbar-fixed-top') do
-         search_for = String.new user['uuid']
-         search_for[0]='1'
-         page.find_field('search').set search_for
-         page.find('.glyphicon-search').click
-       end
- 
-       # we should see 'not found' error page
-       assert page.has_text?('Not Found'), 'No text - Not Found'
-       assert page.has_link?('Report problem'), 'No text - Report problem'
-       click_link 'Report problem'
-       within '.modal-content' do
-         assert page.has_text?('Report a problem'), 'No text - Report a problem'
-         assert page.has_no_text?('Version / debugging info'), 'No text - Version / debugging info'
-         assert page.has_text?('Server version'), 'No text - Server version'
-         assert page.has_text?('Server restarted at'), 'No text - Server restarted at'
-         assert page.has_text?('Found a problem?'), 'No text - Found a problem'
-         assert page.has_button?('Report issue'), 'No button - Report issue'
-         assert page.has_button?('Cancel'), 'No button - Cancel'
- 
-         # enter a report text and click on report
-         page.find_field('report_issue_text').set 'my test report text'
-         click_button 'Report issue'
- 
-         # ajax success updated button texts and added footer message
-         assert page.has_no_button?('Report issue'), 'Found button - Report issue'
-         assert page.has_no_button?('Cancel'), 'Found button - Cancel'
-         assert page.has_text?('Report sent'), 'No text - Report sent'
-         assert page.has_button?('Close'), 'No text - Close'
-         assert page.has_text?('Thanks for reporting this issue'), 'No text - Thanks for reporting this issue'
- 
-         click_button 'Close'
-       end
- 
-       # let's search for the anonymously accessible project
-       publicly_accessible_project = api_fixture('groups')['anonymously_accessible_project']
- 
-       within('.navbar-fixed-top') do
-         # search again for the anonymously accessible project
-         page.find_field('search').set publicly_accessible_project['name'][0,10]
-         page.find('.glyphicon-search').click
-       end
- 
-       within '.modal-content' do
-         assert page.has_text?('All projects'), 'No text - All projects'
-         assert page.has_text?('Search'), 'No text - Search'
-         assert page.has_text?('Cancel'), 'No text - Cancel'
-         assert_selector('div', text: publicly_accessible_project['name'])
-         find(:xpath, '//div[./span[contains(.,publicly_accessible_project["uuid"])]]').click
- 
-         click_button 'Show'
-       end
- 
-       # seeing "Unrestricted public data" now
-       assert page.has_text?(publicly_accessible_project['name']), 'No text - publicly accessible project name'
-       assert page.has_text?(publicly_accessible_project['description']), 'No text - publicly accessible project description'
-     end
-   end
- 
    [
      [nil, nil, false, false],
      ['inactive', api_fixture('users')['inactive'], true, false],
@@@ -375,11 -296,9 +253,10 @@@
    end
  
    [
--    ['active', api_fixture('users')['active'], true, true],
--    ['admin', api_fixture('users')['admin'], true, true],
++    ['active', api_fixture('users')['active']],
++    ['admin', api_fixture('users')['admin']],
    ].each do |token, user|
 +
      test "test system menu for user #{token}" do
        visit page_with_token(token)
        verify_system_menu user
@@@ -389,12 -308,10 +266,5 @@@
        visit page_with_token(token)
        verify_manage_account user
      end
--
--    test "test search for user #{token}" do
--      visit page_with_token(token)
--      verify_search_box user
--    end
- 
    end
- 
  end
diff --cc apps/workbench/test/integration/report_issue_test.rb
index 0000000,0000000..ce534ff
new file mode 100644
--- /dev/null
+++ b/apps/workbench/test/integration/report_issue_test.rb
@@@ -1,0 -1,0 +1,106 @@@
++require 'integration_helper'
++require 'selenium-webdriver'
++require 'headless'
++
++class ApplicationLayoutTest < ActionDispatch::IntegrationTest
++  setup do
++    headless = Headless.new
++    headless.start
++    Capybara.current_driver = :selenium
++
++    @user_profile_form_fields = Rails.configuration.user_profile_form_fields
++  end
++
++  teardown do
++    Rails.configuration.user_profile_form_fields = @user_profile_form_fields
++  end
++
++  # test version info and report issue from help menu
++  def check_version_info_and_report_issue_from_help_menu
++    within('.navbar-fixed-top') do
++      page.find("#arv-help").click
++      within('.dropdown-menu') do
++        assert page.has_link?('Tutorials and User guide'), 'No link - Tutorials and User guide'
++        assert page.has_link?('API Reference'), 'No link - API Reference'
++        assert page.has_link?('SDK Reference'), 'No link - SDK Reference'
++        assert page.has_link?('Show version / debugging info'), 'No link - Show version / debugging info'
++        assert page.has_link?('Report a problem'), 'No link - Report a problem'
++
++        # check show version info link
++        click_link 'Show version / debugging info'
++      end
++    end
++
++    within '.modal-content' do
++      assert page.has_text?('Version / debugging info'), 'No text - Version / debugging info'
++      assert page.has_no_text?('Report a problem'), 'Found text - Report a problem'
++      assert page.has_text?('Server version'), 'No text - Server version'
++      assert page.has_text?('Server restarted at'), 'No text - Server restarted at'
++      assert page.has_text?('Workbench version'), 'No text - Workbench version'
++      assert page.has_text?('Arvados base'), 'No text - Arvados base'
++      assert page.has_text?('Additional info'), 'No text - Additional info'
++      assert page.has_no_text?('Found a problem?'), 'Found text - Found a problem'
++      assert page.has_button?('Close'), 'No button - Close'
++      assert page.has_no_button?('Report issue'), 'Found button - Report issue'
++      click_button 'Close'
++    end
++
++    # check report issue link
++    within('.navbar-fixed-top') do
++      page.find("#arv-help").click
++      within('.dropdown-menu') do
++        click_link 'Report a problem'
++      end
++    end
++
++    within '.modal-content' do
++      assert page.has_text?('Report a problem'), 'No text - Report a problem'
++      assert page.has_no_text?('Version / debugging info'), 'Found text - Version / debugging info'
++      assert page.has_text?('Server version'), 'No text - Server version'
++      assert page.has_text?('Server restarted at'), 'No text - Server restarted at'
++      assert page.has_text?('Workbench version'), 'No text - Workbench version'
++      assert page.has_text?('Arvados base'), 'No text - Arvados base'
++      assert page.has_text?('Additional info'), 'No text - Additional info'
++      assert page.has_text?('Found a problem?'), 'No text - Found a problem'
++      assert page.has_no_button?('Close'), 'Found button - Close'
++      assert page.has_button?('Report issue'), 'No button - Report issue'
++      assert page.has_button?('Cancel'), 'No button - Cancel'
++
++      # enter a report text and click on report
++      page.find_field('report_issue_text').set 'my test report text'
++      click_button 'Report issue'
++
++      # ajax success updated button texts and added footer message
++      assert page.has_no_button?('Report issue'), 'Found button - Report issue'
++      assert page.has_no_button?('Cancel'), 'Found button - Cancel'
++      assert page.has_text?('Report sent'), 'No text - Report sent'
++      assert page.has_button?('Close'), 'No text - Close'
++      assert page.has_text?('Thanks for reporting this issue'), 'No text - Thanks for reporting this issue'
++
++      click_button 'Close'
++    end
++  end
++
++  [
++    [nil, nil],
++    ['inactive', api_fixture('users')['inactive']],
++    ['inactive_uninvited', api_fixture('users')['inactive_uninvited']],
++    ['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']],
++  ].each do |token, user|
++
++    test "check help for user #{token}" do
++      if !token
++        visit ('/')
++      else
++        visit page_with_token(token)
++      end
++
++      check_version_info_and_report_issue_from_help_menu
++    end
++
++  end
++
++end
diff --cc apps/workbench/test/integration/search_box_test.rb
index 0000000,0000000..be9931d
new file mode 100644
--- /dev/null
+++ b/apps/workbench/test/integration/search_box_test.rb
@@@ -1,0 -1,0 +1,97 @@@
++require 'integration_helper'
++require 'selenium-webdriver'
++require 'headless'
++
++class ApplicationLayoutTest < ActionDispatch::IntegrationTest
++  setup do
++    headless = Headless.new
++    headless.start
++    Capybara.current_driver = :selenium
++  end
++
++  # test the search box
++  def verify_search_box user
++    if user && user['is_active']
++      # let's search for a valid uuid
++      within('.navbar-fixed-top') do
++        page.find_field('search').set user['uuid']
++        page.find('.glyphicon-search').click
++      end
++
++      # we should now be in the user's home project as a result of search
++      assert_selector "#Data_collections[data-object-uuid='#{user['uuid']}']", "Expected to be in user page after search click"
++
++      # let's search again for an invalid valid uuid
++      within('.navbar-fixed-top') do
++        search_for = String.new user['uuid']
++        search_for[0]='1'
++        page.find_field('search').set search_for
++        page.find('.glyphicon-search').click
++      end
++
++      # we should see 'not found' error page
++      assert page.has_text?('Not Found'), 'No text - Not Found'
++      assert page.has_link?('Report problem'), 'No text - Report problem'
++      click_link 'Report problem'
++      within '.modal-content' do
++        assert page.has_text?('Report a problem'), 'No text - Report a problem'
++        assert page.has_no_text?('Version / debugging info'), 'No text - Version / debugging info'
++        assert page.has_text?('Server version'), 'No text - Server version'
++        assert page.has_text?('Server restarted at'), 'No text - Server restarted at'
++        assert page.has_text?('Found a problem?'), 'No text - Found a problem'
++        assert page.has_button?('Report issue'), 'No button - Report issue'
++        assert page.has_button?('Cancel'), 'No button - Cancel'
++
++        # enter a report text and click on report
++        page.find_field('report_issue_text').set 'my test report text'
++        click_button 'Report issue'
++
++        # ajax success updated button texts and added footer message
++        assert page.has_no_button?('Report issue'), 'Found button - Report issue'
++        assert page.has_no_button?('Cancel'), 'Found button - Cancel'
++        assert page.has_text?('Report sent'), 'No text - Report sent'
++        assert page.has_button?('Close'), 'No text - Close'
++        assert page.has_text?('Thanks for reporting this issue'), 'No text - Thanks for reporting this issue'
++
++        click_button 'Close'
++      end
++
++      # let's search for the anonymously accessible project
++      publicly_accessible_project = api_fixture('groups')['anonymously_accessible_project']
++
++      within('.navbar-fixed-top') do
++        # search again for the anonymously accessible project
++        page.find_field('search').set publicly_accessible_project['name'][0,10]
++        page.find('.glyphicon-search').click
++      end
++
++      within '.modal-content' do
++        assert page.has_text?('All projects'), 'No text - All projects'
++        assert page.has_text?('Search'), 'No text - Search'
++        assert page.has_text?('Cancel'), 'No text - Cancel'
++        assert_selector('div', text: publicly_accessible_project['name'])
++        find(:xpath, '//div[./span[contains(.,publicly_accessible_project["uuid"])]]').click
++
++        click_button 'Show'
++      end
++
++      # seeing "Unrestricted public data" now
++      assert page.has_text?(publicly_accessible_project['name']), 'No text - publicly accessible project name'
++      assert page.has_text?(publicly_accessible_project['description']), 'No text - publicly accessible project description'
++    end
++  end
++
++  [
++    ['active', api_fixture('users')['active']],
++    ['admin', api_fixture('users')['admin']],
++  ].each do |token, user|
++
++    test "test search for user #{token}" do
++      visit page_with_token(token)
++
++      verify_search_box user
++    end
++
++  end
++
++end

-----------------------------------------------------------------------


hooks/post-receive
-- 




More information about the arvados-commits mailing list