Merge branch 'master' into 4823-python-sdk-writable-collection-api
[arvados.git] / apps / workbench / test / integration / user_profile_test.rb
index ede67ff36aff82dd661a2cb0f2ebc1df6996e724..accc6a7963ef5a9a8dee8ad188f0c8552d9d070d 100644 (file)
@@ -1,13 +1,8 @@
 require 'integration_helper'
-require 'selenium-webdriver'
-require 'headless'
 
 class UserProfileTest < ActionDispatch::IntegrationTest
   setup do
-    headless = Headless.new
-    headless.start
-    Capybara.current_driver = :selenium
-
+    need_javascript
     @user_profile_form_fields = Rails.configuration.user_profile_form_fields
   end
 
@@ -25,7 +20,7 @@ class UserProfileTest < ActionDispatch::IntegrationTest
         assert page.has_text?('Save profile'), 'No text - Save profile'
         add_profile user
       else
-        assert page.has_text?('My projects'), 'Not found text - My projects'
+        assert page.has_text?('Active pipelines'), 'Not found text - Active pipelines'
         assert page.has_no_text?('Save profile'), 'Found text - Save profile'
       end
     elsif invited
@@ -68,10 +63,10 @@ class UserProfileTest < ActionDispatch::IntegrationTest
     assert page.has_no_text?('Projects shared with me'), 'Found text - Projects shared with me'
 
     assert page.has_text?('Profile'), 'No text - Profile'
-    assert page.has_text?('First name'), 'No text - First name'
-    assert page.has_text?('Last name'), 'No text - Last name'
+    assert page.has_text?('First Name'), 'No text - First Name'
+    assert page.has_text?('Last Name'), 'No text - Last Name'
     assert page.has_text?('Identity URL'), 'No text - Identity URL'
-    assert page.has_text?('Email'), 'No text - Email'
+    assert page.has_text?('E-mail'), 'No text - E-mail'
     assert page.has_text?(user['email']), 'No text - user email'
 
     # Using the default profile which has message and one required field
@@ -79,8 +74,8 @@ class UserProfileTest < ActionDispatch::IntegrationTest
     # Save profile without filling in the required field. Expect to be back in this profile page again
     click_button "Save profile"
     assert page.has_text?('Profile'), 'No text - Profile'
-    assert page.has_text?('First name'), 'No text - First name'
-    assert page.has_text?('Last name'), 'No text - Last name'
+    assert page.has_text?('First Name'), 'No text - First Name'
+    assert page.has_text?('Last Name'), 'No text - Last Name'
     assert page.has_text?('Save profile'), 'No text - Save profile'
 
     # This time fill in required field and then save. Expect to go to requested page after that.
@@ -106,8 +101,7 @@ class UserProfileTest < ActionDispatch::IntegrationTest
     click_link 'Back to work!'
 
     # profile saved and in home page now
-    assert page.has_text?('My projects'), 'No text - My projects'
-    assert page.has_text?('Projects shared with me'), 'No text - Projects shared with me'
+    assert page.has_text?('Active pipelines'), 'No text - Active pipelines'
   end
 
   [