From c59f2a022ae4cde04b74da80ed31c291f56bde05 Mon Sep 17 00:00:00 2001 From: Pete Matsyburka Date: Sat, 28 Dec 2024 16:58:20 +0200 Subject: [PATCH 01/14] increase retries --- app/jobs/send_form_completed_webhook_request_job.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/jobs/send_form_completed_webhook_request_job.rb b/app/jobs/send_form_completed_webhook_request_job.rb index 22a724588..253ebf33d 100644 --- a/app/jobs/send_form_completed_webhook_request_job.rb +++ b/app/jobs/send_form_completed_webhook_request_job.rb @@ -7,7 +7,7 @@ class SendFormCompletedWebhookRequestJob USER_AGENT = 'DocuSeal.com Webhook' - MAX_ATTEMPTS = 10 + MAX_ATTEMPTS = 20 def perform(params = {}) submitter = Submitter.find(params['submitter_id']) From 616aced4e449561ea3e2c9870f4eadf1d67c9e89 Mon Sep 17 00:00:00 2001 From: Pete Matsyburka Date: Mon, 30 Dec 2024 19:06:08 +0200 Subject: [PATCH 02/14] fix spec --- spec/jobs/send_form_completed_webhook_request_job_spec.rb | 2 +- spec/jobs/send_submission_completed_webhook_request_job_spec.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/spec/jobs/send_form_completed_webhook_request_job_spec.rb b/spec/jobs/send_form_completed_webhook_request_job_spec.rb index c4a09da84..b57e74b29 100644 --- a/spec/jobs/send_form_completed_webhook_request_job_spec.rb +++ b/spec/jobs/send_form_completed_webhook_request_job_spec.rb @@ -85,7 +85,7 @@ stub_request(:post, webhook_url.url).to_return(status: 401) expect do - described_class.new.perform('submitter_id' => submitter.id, 'webhook_url_id' => webhook_url.id, 'attempt' => 11) + described_class.new.perform('submitter_id' => submitter.id, 'webhook_url_id' => webhook_url.id, 'attempt' => 21) end.not_to change(described_class.jobs, :size) expect(WebMock).to have_requested(:post, webhook_url.url).once diff --git a/spec/jobs/send_submission_completed_webhook_request_job_spec.rb b/spec/jobs/send_submission_completed_webhook_request_job_spec.rb index 2cef72ccc..e2f0d26e3 100644 --- a/spec/jobs/send_submission_completed_webhook_request_job_spec.rb +++ b/spec/jobs/send_submission_completed_webhook_request_job_spec.rb @@ -83,7 +83,7 @@ expect do described_class.new.perform('submission_id' => submission.id, 'webhook_url_id' => webhook_url.id, - 'attempt' => 11) + 'attempt' => 21) end.not_to change(described_class.jobs, :size) expect(WebMock).to have_requested(:post, webhook_url.url).once From 19b5a07bac7171aec5953f35a32f7ee5be3b581d Mon Sep 17 00:00:00 2001 From: Alex Turchyn Date: Mon, 30 Dec 2024 23:26:48 +0200 Subject: [PATCH 03/14] Add 'Test mode' switch to the profile dropdown --- app/views/shared/_navbar.html.erb | 10 +++++ app/views/shared/_settings_nav.html.erb | 10 ++--- app/views/shared/_test_alert.html.erb | 2 +- app/views/shared/_test_mode_toggle.html.erb | 2 +- app/views/templates_code_modal/show.html.erb | 2 +- app/views/templates_preferences/show.html.erb | 2 +- app/views/testing_api_settings/index.html.erb | 2 +- config/locales/i18n.yml | 42 +++++++++++-------- 8 files changed, 44 insertions(+), 28 deletions(-) diff --git a/app/views/shared/_navbar.html.erb b/app/views/shared/_navbar.html.erb index 98acc80e8..aef418a1d 100644 --- a/app/views/shared/_navbar.html.erb +++ b/app/views/shared/_navbar.html.erb @@ -49,6 +49,16 @@ <% end %> <% end %> + <% if (can?(:manage, EncryptedConfig) && current_user == true_user) || (current_user != true_user && current_account.testing?) %> + <%= form_for '', url: testing_account_path, method: current_account.testing? ? :delete : :get, html: { class: 'w-full py-1' } do |f| %> + + <% end %> + <% end %>
  • <%= button_to destroy_user_session_path, method: :delete, data: { turbo: false }, class: 'flex items-center' do %> <%= svg_icon('logout', class: 'w-5 h-5 flex-shrink-0 stroke-2 mr-2 inline') %> diff --git a/app/views/shared/_settings_nav.html.erb b/app/views/shared/_settings_nav.html.erb index 892e65f08..f052113c3 100644 --- a/app/views/shared/_settings_nav.html.erb +++ b/app/views/shared/_settings_nav.html.erb @@ -90,16 +90,16 @@ <% end %> <%= render 'shared/settings_nav_extra2' %> <% if (can?(:manage, EncryptedConfig) && current_user == true_user) || (current_user != true_user && current_account.testing?) %> -
  • - <%= form_for '', url: testing_account_path, method: current_account.testing? ? :delete : :get, html: { class: 'flex w-full' } do |f| %> + <%= form_for '', url: testing_account_path, method: current_account.testing? ? :delete : :get, html: { class: 'w-full' } do |f| %> +
  • - <% end %> -
  • + + <% end %> <% end %> <% end %> diff --git a/app/views/shared/_test_alert.html.erb b/app/views/shared/_test_alert.html.erb index a7dcbd313..96dd27b38 100644 --- a/app/views/shared/_test_alert.html.erb +++ b/app/views/shared/_test_alert.html.erb @@ -2,7 +2,7 @@