X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/78a0505d03f79f667926eff41954f5212bf57c2c..21bb2196ecfaba6ec1e7162b8e8901988945daf1:/apps/workbench/test/integration/user_profile_test.rb?ds=sidebyside diff --git a/apps/workbench/test/integration/user_profile_test.rb b/apps/workbench/test/integration/user_profile_test.rb index 59a1203051..e4d9894e5f 100644 --- a/apps/workbench/test/integration/user_profile_test.rb +++ b/apps/workbench/test/integration/user_profile_test.rb @@ -1,3 +1,7 @@ +# Copyright (C) The Arvados Authors. All rights reserved. +# +# SPDX-License-Identifier: AGPL-3.0 + require 'integration_helper' class UserProfileTest < ActionDispatch::IntegrationTest @@ -96,10 +100,11 @@ class UserProfileTest < ActionDispatch::IntegrationTest required_field_title = '' required_field_key = '' profile_config = Rails.configuration.user_profile_form_fields - profile_config.andand.each do |entry| + profile_config.each do |entry| if entry['required'] required_field_key = entry['key'] required_field_title = entry['form_field_title'] + break end end @@ -111,6 +116,9 @@ class UserProfileTest < ActionDispatch::IntegrationTest click_button "Save profile" # profile saved and in profile page now with success assert_text('Thank you for filling in your profile') + assert_selector('input' + + '[name="user[prefs][profile]['+required_field_key+']"]' + + '[value="value to fill required field"]') if user['prefs']['getting_started_shown'] click_link 'Back to work!' else