diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 516e256a..e781f129 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -149,6 +149,7 @@ jobs: RAILS_ENV: production SECRET_KEY_BASE: dummy-for-precompile DATABASE_URL: postgres://postgres:postgres@localhost:5432/wabosign_test + RUN_MIGRATIONS: 'false' run: | bundle exec rake assets:precompile diff --git a/app/controllers/embed_scripts_controller.rb b/app/controllers/embed_scripts_controller.rb index a64f2dcc..31a35729 100644 --- a/app/controllers/embed_scripts_controller.rb +++ b/app/controllers/embed_scripts_controller.rb @@ -1,7 +1,7 @@ # frozen_string_literal: true class EmbedScriptsController < ActionController::Metal - DUMMY_SCRIPT = <<~JAVASCRIPT.freeze + DUMMY_SCRIPT = <<~JAVASCRIPT const DummyBuilder = class extends HTMLElement { connectedCallback() { this.innerHTML = ` diff --git a/app/controllers/sessions_controller.rb b/app/controllers/sessions_controller.rb index 649f3d87..06d746e7 100644 --- a/app/controllers/sessions_controller.rb +++ b/app/controllers/sessions_controller.rb @@ -25,9 +25,7 @@ class SessionsController < Devise::SessionsController private def after_sign_in_path_for(...) - if params[:redir].present? - return params[:redir] - end + return params[:redir] if params[:redir].present? super end diff --git a/app/views/sms_settings/index.html.erb b/app/views/sms_settings/index.html.erb index 0913f91e..ef699287 100644 --- a/app/views/sms_settings/index.html.erb +++ b/app/views/sms_settings/index.html.erb @@ -6,21 +6,19 @@ <% value = @encrypted_config.value || {} %> <% sms_enabled = Sms.enabled?(current_account) %> <% sms_live = Sms.enabled_for?(current_account) %> - <% - provider_labels = { - 'bulkvs' => 'BulkVS', - 'twilio' => 'Twilio', - 'voipms' => 'VoIP.ms', - 'signalwire' => 'SignalWire' - } - sending_number = case value['provider'].to_s - when 'twilio' then value['twilio_from'] - when 'voipms' then value['voipms_did'] - when 'signalwire' then value['signalwire_from'] - else value['from_number'] - end - selected_provider = value['provider'].presence || 'bulkvs' - %> + <% provider_labels = { + 'bulkvs' => 'BulkVS', + 'twilio' => 'Twilio', + 'voipms' => 'VoIP.ms', + 'signalwire' => 'SignalWire' + } + sending_number = case value['provider'].to_s + when 'twilio' then value['twilio_from'] + when 'voipms' then value['voipms_did'] + when 'signalwire' then value['signalwire_from'] + else value['from_number'] + end + selected_provider = value['provider'].presence || 'bulkvs' %> <% if sms_live %>
diff --git a/app/views/sso_settings/index.html.erb b/app/views/sso_settings/index.html.erb index 83f70bfb..e17fac1d 100644 --- a/app/views/sso_settings/index.html.erb +++ b/app/views/sso_settings/index.html.erb @@ -5,6 +5,12 @@ <% creds = Wabosign.google_sso_credentials %> <% value = @encrypted_config.value || {} %> + <% callback_uri = + begin + "#{root_url}auth/google_oauth2/callback" + rescue StandardError + '/auth/google_oauth2/callback' + end %> <% if creds[:source] == :env %>
@@ -37,7 +43,7 @@

Google SSO is not configured

Fill in your Google Cloud OAuth client details below. The OAuth redirect URI to register in Google Cloud Console is - <%= "#{root_url}auth/google_oauth2/callback" rescue '/auth/google_oauth2/callback' %>. + <%= callback_uri %>.

diff --git a/spec/system/feature_toggles_spec.rb b/spec/system/feature_toggles_spec.rb index dee48168..5b06d920 100644 --- a/spec/system/feature_toggles_spec.rb +++ b/spec/system/feature_toggles_spec.rb @@ -94,7 +94,7 @@ RSpec.describe 'Feature Toggles' do email: 'second@example.com') end - pending 'blocks second signer: Vue timing issue with Submitters.current_submitter_order?' do + it 'blocks second signer', skip: 'Vue timing issue with Submitters.current_submitter_order?' do create(:account_config, account:, key: AccountConfig::ENFORCE_SIGNING_ORDER_KEY, value: true) visit submit_form_path(slug: second_submitter.slug) @@ -143,7 +143,7 @@ RSpec.describe 'Feature Toggles' do let(:other_account) { create(:account) } let(:other_user) { create(:user, account: other_account) } - pending 'force MFA: requires multitenant mode' do + it 'force MFA', skip: 'requires multitenant mode' do create(:account_config, account: other_account, key: AccountConfig::FORCE_MFA, value: true) sign_in(other_user) diff --git a/spec/system/signing_flow_edge_cases_spec.rb b/spec/system/signing_flow_edge_cases_spec.rb index b2567a34..7b38f7bf 100644 --- a/spec/system/signing_flow_edge_cases_spec.rb +++ b/spec/system/signing_flow_edge_cases_spec.rb @@ -20,7 +20,7 @@ RSpec.describe 'Signing Flow Edge Cases' do email: 'second@example.com') end - pending 'blocks second signer: Vue timing issue with Submitters.current_submitter_order?' do + it 'blocks second signer', skip: 'Vue timing issue with Submitters.current_submitter_order?' do create(:account_config, account:, key: AccountConfig::ENFORCE_SIGNING_ORDER_KEY, value: true) visit submit_form_path(slug: second_submitter.slug) @@ -78,7 +78,7 @@ RSpec.describe 'Signing Flow Edge Cases' do create(:account_config, account:, key: AccountConfig::ALLOW_TO_RESUBMIT, value: true) end - pending 'resubmit flow: field not found on second start form visit' do + it 'resubmit flow', skip: 'field not found on second start form visit' do visit start_form_path(slug: template.slug) fill_in 'Email', with: 'john@example.com' @@ -116,14 +116,16 @@ RSpec.describe 'Signing Flow Edge Cases' do submission.update!(template_fields: fields) end - pending 'optional fields: Vue teleport timing issue with complete button' do + it 'optional fields', skip: 'Vue teleport timing issue with complete button' do visit submit_form_path(slug: submitter.slug) find('#expand_form_button').click expect(page).to have_css('#complete_button_container') - page.execute_script('document.getElementById("complete_form_button")?.click() || document.querySelector(".complete-button")?.click()') + complete_js = 'document.getElementById("complete_form_button")?.click() || ' \ + 'document.querySelector(".complete-button")?.click()' + page.execute_script(complete_js) expect(page).to have_content('Form has been completed!') diff --git a/spec/system/template_crud_edge_cases_spec.rb b/spec/system/template_crud_edge_cases_spec.rb index fb51fc47..5da38658 100644 --- a/spec/system/template_crud_edge_cases_spec.rb +++ b/spec/system/template_crud_edge_cases_spec.rb @@ -23,7 +23,7 @@ RSpec.describe 'Template CRUD Edge Cases' do expect(template.reload.archived_at).to be_nil end - pending 'archived templates index: restore button selector not matching' do + it 'archived templates index', skip: 'restore button selector not matching' do visit templates_archived_index_path expect(page).to have_content(template.name)