Skip to content

Commit

Permalink
RST-5588 GovUK frontend update (#600)
Browse files Browse the repository at this point in the history
* GovUK frontend lib update
* minor gem updates and rubocop autofix
* Use specific driver version
  • Loading branch information
zaparka authored Aug 3, 2023
1 parent fab3ff9 commit 26ec9ea
Show file tree
Hide file tree
Showing 9 changed files with 37 additions and 36 deletions.
24 changes: 12 additions & 12 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ GEM
i18n (>= 1.6, < 2)
minitest (>= 5.1)
tzinfo (~> 2.0)
addressable (2.8.4)
addressable (2.8.5)
public_suffix (>= 2.0.2, < 6.0)
apparition (0.6.0)
capybara (~> 3.13, < 4)
Expand Down Expand Up @@ -236,10 +236,10 @@ GEM
mime-types-data (3.2023.0218.1)
mini_mime (1.1.2)
mini_portile2 (2.8.4)
minitest (5.18.1)
minitest (5.19.0)
msgpack (1.7.2)
multi_test (1.1.0)
net-imap (0.3.6)
net-imap (0.3.7)
date
net-protocol
net-pop (0.1.2)
Expand Down Expand Up @@ -268,7 +268,7 @@ GEM
puma (6.3.0)
nio4r (~> 2.0)
racc (1.7.1)
rack (2.2.7)
rack (2.2.8)
rack-test (2.1.0)
rack (>= 1.3)
rails (7.0.6)
Expand Down Expand Up @@ -314,7 +314,7 @@ GEM
http-cookie (>= 1.0.2, < 2.0)
mime-types (>= 1.16, < 4.0)
netrc (~> 0.8)
rexml (3.2.5)
rexml (3.2.6)
rspec-core (3.12.2)
rspec-support (~> 3.12.0)
rspec-expectations (3.12.3)
Expand All @@ -334,15 +334,15 @@ GEM
rspec-support (3.12.1)
rspec_junit_formatter (0.6.0)
rspec-core (>= 2, < 4, != 2.12.0)
rubocop (1.54.2)
rubocop (1.55.1)
json (~> 2.3)
language_server-protocol (>= 3.17.0)
parallel (~> 1.10)
parser (>= 3.2.2.3)
rainbow (>= 2.2.2, < 4.0)
regexp_parser (>= 1.8, < 3.0)
rexml (>= 3.2.5, < 4.0)
rubocop-ast (>= 1.28.0, < 2.0)
rubocop-ast (>= 1.28.1, < 2.0)
ruby-progressbar (~> 1.7)
unicode-display_width (>= 2.4.0, < 3.0)
rubocop-ast (1.29.0)
Expand All @@ -358,7 +358,7 @@ GEM
activesupport (>= 4.2.0)
rack (>= 1.1)
rubocop (>= 1.33.0, < 2.0)
rubocop-rspec (2.22.0)
rubocop-rspec (2.23.0)
rubocop (~> 1.33)
rubocop-capybara (~> 2.17)
rubocop-factory_bot (~> 2.22)
Expand Down Expand Up @@ -436,22 +436,22 @@ GEM
activemodel (>= 6.0.0)
bindex (>= 0.4.0)
railties (>= 6.0.0)
webdrivers (5.2.0)
webdrivers (5.3.1)
nokogiri (~> 1.6)
rubyzip (>= 1.3.0)
selenium-webdriver (~> 4.0)
selenium-webdriver (~> 4.0, < 4.11)
webmock (3.18.1)
addressable (>= 2.8.0)
crack (>= 0.3.2)
hashdiff (>= 0.4.0, < 2.0.0)
webrick (1.8.1)
websocket (1.2.9)
websocket-driver (0.7.5)
websocket-driver (0.7.6)
websocket-extensions (>= 0.1.0)
websocket-extensions (0.1.5)
xpath (3.2.0)
nokogiri (~> 1.8)
zeitwerk (2.6.8)
zeitwerk (2.6.11)

PLATFORMS
ruby
Expand Down
3 changes: 3 additions & 0 deletions features/support/capybara_driver_helper.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
Selenium::WebDriver.logger.level = :error

# Temporary fix
Webdrivers::Chromedriver.required_version = "114.0.5735.90"

Capybara.configure do |config|
driver = ENV['DRIVER']&.to_sym || :headless
config.default_driver = driver
Expand Down
14 changes: 7 additions & 7 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@
"scripts": {},
"engineStrict": true,
"dependencies": {
"govuk-frontend": "^4.6.0"
"govuk-frontend": "^4.7.0"
}
}
3 changes: 1 addition & 2 deletions spec/controllers/questions_controller_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@
before do
allow(QuestionFormFactory).to receive(:get_form).with(valid_id).and_return(form)
allow(QuestionFormFactory).to receive(:get_form).with(invalid_id).and_raise(QuestionFormFactory::QuestionDoesNotExist)
allow(controller).to receive(:session).and_return(session)
allow(controller).to receive(:online_application).and_return(online_application)
allow(controller).to receive_messages(session: session, online_application: online_application)
allow(Storage).to receive(:new).with(session).and_return(storage)
allow(Views::QuestionTitle).to receive(:new).with(form, online_application).and_return(question_title_view)
end
Expand Down
3 changes: 1 addition & 2 deletions spec/controllers/summaries_controller_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,7 @@
let(:summary_view) { double }

before do
allow(controller).to receive(:storage).and_return(storage)
allow(controller).to receive(:online_application).and_return(online_application)
allow(controller).to receive_messages(storage: storage, online_application: online_application)
allow(Views::Summary).to receive(:new).with(online_application).and_return(summary_view)

get :show
Expand Down
4 changes: 2 additions & 2 deletions spec/models/forms/base_range_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,13 @@ module Forms
context 'when neither "less, between or more"' do
let(:choice) { 'whatever' }

it { is_expected.to be_invalid }
it { is_expected.not_to be_valid }
end

context 'when empty' do
let(:choice) { nil }

it { is_expected.to be_invalid }
it { is_expected.not_to be_valid }
end
end
end
Expand Down
8 changes: 4 additions & 4 deletions spec/models/forms/income_amount_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,20 +13,20 @@
context 'when no amount set' do
let(:amount) { nil }

it { is_expected.to be_invalid }
it { is_expected.not_to be_valid }
end

context 'when the amount is set' do
context 'when less than 0' do
let(:amount) { -1 }

it { is_expected.to be_invalid }
it { is_expected.not_to be_valid }
end

context 'when more than 1 000 000' do
let(:amount) { 1000001 }

it { is_expected.to be_invalid }
it { is_expected.not_to be_valid }
end

context 'when within the thresholds' do
Expand All @@ -41,7 +41,7 @@
let(:min_threshold) { 1000 }
let(:max_threshold) { 3000 }

it { is_expected.to be_invalid }
it { is_expected.not_to be_valid }
end
end
end
Expand Down
12 changes: 6 additions & 6 deletions spec/models/forms/savings_and_investment_extra_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,13 @@
context 'when not set' do
let(:over_61) { nil }

it { is_expected.to be_invalid }
it { is_expected.not_to be_valid }
end

context 'when something else than true or false' do
let(:over_61) { 'something' }

it { is_expected.to be_invalid }
it { is_expected.not_to be_valid }
end
end

Expand All @@ -42,20 +42,20 @@
context 'when no amount set' do
let(:amount) { nil }

it { is_expected.to be_invalid }
it { is_expected.not_to be_valid }
end

context 'when the amount is set' do
context 'when below the minimum threshold' do
let(:amount) { 2999 }

it { is_expected.to be_invalid }
it { is_expected.not_to be_valid }
end

context 'when above the maximum threshold' do
let(:amount) { 16000 }

it { is_expected.to be_invalid }
it { is_expected.not_to be_valid }
end

context 'when within the thresholds' do
Expand All @@ -77,7 +77,7 @@
let(:over_61) { nil }
let(:amount) { nil }

it { is_expected.to be_invalid }
it { is_expected.not_to be_valid }
end
end
end
Expand Down

0 comments on commit 26ec9ea

Please sign in to comment.