Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix parliament vote app email template format on some iPhones #599

Merged
merged 3 commits into from
Sep 11, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .ruby-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.2.1
3.2.2
10 changes: 5 additions & 5 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
source 'https://rubygems.org'
git_source(:github) { |repo| "https://github.com/#{repo}.git" }

ruby '3.2.1'
ruby '3.2.2'

# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '~> 6.1.7.3'
Expand Down Expand Up @@ -80,7 +80,7 @@ group :development, :test do
gem 'byebug', platforms: [:mri, :mingw, :x64_mingw]
gem 'dotenv-rails'
gem 'factory_bot_rails'
gem 'rspec-rails', '4.0.0.beta4'
gem 'rspec-rails', '4.0.2'
gem 'rspec_junit_formatter'
gem 'faker'
end
Expand All @@ -98,10 +98,10 @@ end

group :test do
# Adds support for Capybara system testing and selenium driver
gem 'capybara'
gem 'capybara', "~> 3.39.2"
gem 'show_me_the_cookies'
gem 'selenium-webdriver'
gem 'webdrivers'
gem 'selenium-webdriver', "~> 4.9.0"
gem "webdrivers", "= 5.3.0"
gem 'simplecov', '< 0.18' # https://github.com/codeclimate/test-reporter/issues/413
end

Expand Down
52 changes: 26 additions & 26 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ GEM
minitest (>= 5.1)
tzinfo (~> 2.0)
zeitwerk (~> 2.3)
addressable (2.8.1)
addressable (2.8.5)
public_suffix (>= 2.0.2, < 6.0)
aws-eventstream (1.2.0)
aws-partitions (1.734.0)
Expand Down Expand Up @@ -111,7 +111,7 @@ GEM
msgpack (~> 1.2)
builder (3.2.4)
byebug (11.1.3)
capybara (3.38.0)
capybara (3.39.2)
addressable
matrix
mini_mime (>= 0.1.3)
Expand Down Expand Up @@ -227,8 +227,8 @@ GEM
marcel (1.0.2)
matrix (0.4.2)
method_source (1.0.0)
mini_mime (1.1.2)
mini_portile2 (2.8.1)
mini_mime (1.1.5)
mini_portile2 (2.8.4)
minitest (5.18.0)
msgpack (1.6.1)
multi_xml (0.6.0)
Expand All @@ -244,8 +244,8 @@ GEM
net-smtp (0.3.3)
net-protocol
nio4r (2.5.8)
nokogiri (1.14.3)
mini_portile2 (~> 2.8.0)
nokogiri (1.15.4)
mini_portile2 (~> 2.8.2)
racc (~> 1.4)
oauth2 (2.0.9)
faraday (>= 0.17.3, < 3.0)
Expand Down Expand Up @@ -287,15 +287,15 @@ GEM
method_source (~> 1.0)
pry-rails (0.3.9)
pry (>= 0.10.4)
public_suffix (5.0.1)
public_suffix (5.0.3)
puma (6.1.1)
nio4r (~> 2.0)
que (2.2.0)
que-web (0.10.0)
que (>= 1)
sinatra
racc (1.6.2)
rack (2.2.6.4)
racc (1.7.1)
rack (2.2.8)
rack-protection (3.0.5)
rack
rack-proxy (0.7.6)
Expand Down Expand Up @@ -337,28 +337,28 @@ GEM
ffi (~> 1.0)
recaptcha (5.12.3)
json
regexp_parser (2.7.0)
regexp_parser (2.8.1)
responders (3.1.0)
actionpack (>= 5.2)
railties (>= 5.2)
rexml (3.2.5)
rexml (3.2.6)
rollbar (3.4.0)
rspec-core (3.12.1)
rspec-support (~> 3.12.0)
rspec-expectations (3.12.2)
rspec-expectations (3.12.3)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.12.0)
rspec-mocks (3.12.4)
rspec-mocks (3.12.6)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.12.0)
rspec-rails (4.0.0.beta4)
rspec-rails (4.0.2)
actionpack (>= 4.2)
activesupport (>= 4.2)
railties (>= 4.2)
rspec-core (~> 3.9)
rspec-expectations (~> 3.9)
rspec-mocks (~> 3.9)
rspec-support (~> 3.9)
rspec-core (~> 3.10)
rspec-expectations (~> 3.10)
rspec-mocks (~> 3.10)
rspec-support (~> 3.10)
rspec-support (3.12.0)
rspec_junit_formatter (0.6.0)
rspec-core (>= 2, < 4, != 2.12.0)
Expand All @@ -374,7 +374,7 @@ GEM
sprockets (> 3.0)
sprockets-rails
tilt
selenium-webdriver (4.8.1)
selenium-webdriver (4.9.1)
rexml (~> 3.2, >= 3.2.5)
rubyzip (>= 1.2.2, < 3.0)
websocket (~> 1.0)
Expand Down Expand Up @@ -435,10 +435,10 @@ GEM
activemodel (>= 6.0.0)
bindex (>= 0.4.0)
railties (>= 6.0.0)
webdrivers (5.2.0)
webdrivers (5.3.0)
nokogiri (~> 1.6)
rubyzip (>= 1.3.0)
selenium-webdriver (~> 4.0)
selenium-webdriver (~> 4.0, < 4.11)
webpacker (5.4.4)
activesupport (>= 5.2)
rack-proxy (>= 0.6.1)
Expand All @@ -461,7 +461,7 @@ DEPENDENCIES
aws-sdk-s3
bootsnap
byebug
capybara
capybara (~> 3.39.2)
clockwork
dotenv-rails
exception_handler
Expand Down Expand Up @@ -493,10 +493,10 @@ DEPENDENCIES
rails-i18n
recaptcha
rollbar
rspec-rails (= 4.0.0.beta4)
rspec-rails (= 4.0.2)
rspec_junit_formatter
sass-rails
selenium-webdriver
selenium-webdriver (~> 4.9.0)
show_me_the_cookies
sib-api-v3-sdk
simplecov (< 0.18)
Expand All @@ -509,11 +509,11 @@ DEPENDENCIES
validate_url
wdm (~> 0.1.0)
web-console
webdrivers
webdrivers (= 5.3.0)
webpacker

RUBY VERSION
ruby 3.2.1p31
ruby 3.2.2p53

BUNDLED WITH
2.1.4
4 changes: 2 additions & 2 deletions app/models/apps/parliament_vote_app/application_form.rb
Original file line number Diff line number Diff line change
Expand Up @@ -131,14 +131,14 @@ def from_slovakia_email_body
ActionController::Base.new.render_to_string(
partial: "apps/parliament_vote_app/application_forms/from_slovakia_email_body",
locals: { model: self },
)
).gsub(/\n/, "\r\n")
end

def from_slovakia_authorized_person_email_body
ActionController::Base.new.render_to_string(
partial: "apps/parliament_vote_app/application_forms/from_slovakia_authorized_person_email_body",
locals: { model: self },
)
).gsub(/\n/, "\r\n")
end

def world_abroad_resident_email_body
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<%= mail_to @application_form.municipality_email, 'pripravenú žiadosť v emailovom klientovi'.html_safe,
target: '_blank',
body: @application_form.from_slovakia_authorized_person_email_body,
subject: 'Žiadosť o hlasovací preukaz do parlamentých volieb.'
subject: 'Žiadosť o hlasovací preukaz do parlamentných volieb.'
%>
alebo ju manuálne skopírujte a odošlite na emailovú adresu obce:
<%= mail_to @application_form.municipality_email, @application_form.municipality_email %>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<%= mail_to @application_form.municipality_email, 'pripravenú žiadosť v emailovom klientovi'.html_safe,
target: '_blank',
body: @application_form.from_slovakia_email_body,
subject: 'Žiadosť o hlasovací preukaz do parlamentých volieb.'
subject: 'Žiadosť o hlasovací preukaz do parlamentných volieb.'
%>
alebo ju manuálne skopírujte a odošlite na emailovú adresu obce:
<%= mail_to @application_form.municipality_email, @application_form.municipality_email %>
Expand Down
2 changes: 1 addition & 1 deletion spec/features/apps/parliament_vote_app_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ def start
expect(page).to have_content('Meno: Ferko Mrkva')
expect(page).to have_content('Rodné číslo: 123')
expect(page).to have_content('Trvalý pobyt: Pupavova 31, 456 Bratislava - Karlova ves')
expect(page).to have_content('Preukaz vyzdvihne splnomocnená osoba: Meno: Jarko Mrkva Číslo občianskeho preukazu: 567')
expect(page).to have_content("Preukaz vyzdvihne splnomocnená osoba:\r \r Meno: Jarko Mrkva\r Číslo občianskeho preukazu: 567")

check 'Poslal/a som žiadosť na úrad'
end
Expand Down
1 change: 0 additions & 1 deletion spec/support/capybara.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
Webdrivers::Chromedriver.required_version = "114.0.5735.90"
Webdrivers::Chromedriver.update

Capybara.register_driver :chrome do |app|
Expand Down