diff --git a/app/commands/concerns/decidim/extra_user_fields/update_account_commands_overrides.rb b/app/commands/concerns/decidim/extra_user_fields/update_account_commands_overrides.rb index 2f0f081..2c43185 100644 --- a/app/commands/concerns/decidim/extra_user_fields/update_account_commands_overrides.rb +++ b/app/commands/concerns/decidim/extra_user_fields/update_account_commands_overrides.rb @@ -11,6 +11,7 @@ module UpdateAccountCommandsOverrides private def update_personal_data + @user.locale = @form.locale @user.name = @form.name @user.nickname = @form.nickname @user.email = @form.email diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index a30b234..66d395a 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -7,3 +7,20 @@ Decidim::Dev.dummy_app_path = File.expand_path(File.join("spec", "decidim_dummy_app")) require "decidim/dev/test/base_spec_helper" + +Capybara.register_driver :headless_chrome do |app| + options = ::Selenium::WebDriver::Chrome::Options.new + options.args << "--headless=new" + options.args << "--no-sandbox" + options.args << if ENV["BIG_SCREEN_SIZE"].present? + "--window-size=1920,3000" + else + "--window-size=1920,1080" + end + options.args << "--ignore-certificate-errors" if ENV["TEST_SSL"] + Capybara::Selenium::Driver.new( + app, + browser: :chrome, + capabilities: [options] + ) +end diff --git a/spec/system/account_spec.rb b/spec/system/account_spec.rb index 44ca322..32f653c 100644 --- a/spec/system/account_spec.rb +++ b/spec/system/account_spec.rb @@ -94,6 +94,7 @@ within ".title-bar" do expect(page).to have_content("Nikola Tesla") + expect(page).to have_content("Castellano") end end end