Skip to content

Commit

Permalink
Remove axis choices for thermostatic analysis charts (#3267)
Browse files Browse the repository at this point in the history
  • Loading branch information
ldodds authored Dec 7, 2023
1 parent c73f4a2 commit 1d62f01
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@

<%= render 'your_thermostatic_control_notice' %>

<%= component 'chart', chart_type: :storage_heater_thermostatic, school: @school do |c| %>
<%= component 'chart', chart_type: :storage_heater_thermostatic, axis_controls: false, school: @school do |c| %>
<% c.with_title do %>
<%= t('advice_pages.storage_heaters.analysis.thermostatic_control.storage_heater_thermostatic.title') %>
<% end %>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
) %>
</p>

<%= component 'chart', chart_type: :thermostatic_up_to_1_year, school: @school do |c| %>
<%= component 'chart', chart_type: :thermostatic_up_to_1_year, axis_controls: false, school: @school do |c| %>
<% c.with_title do %>
<%= t('advice_pages.thermostatic_control.analysis.thermostatic_up_to_1_year.title') %>
<% end %>
Expand Down Expand Up @@ -68,7 +68,7 @@

<%= t('advice_pages.thermostatic_control.analysis.an_alternative_way_of_looking_html') %>

<%= component 'chart', chart_type: :thermostatic_control_large_diurnal_range, school: @school do |c| %>
<%= component 'chart', chart_type: :thermostatic_control_large_diurnal_range, axis_controls: false, school: @school do |c| %>
<% c.with_title do %>
<%= t('advice_pages.thermostatic_control.analysis.thermostatic_control_large_diurnal_range.title') %>
<% end %>
Expand Down
3 changes: 3 additions & 0 deletions spec/system/schools/advice_pages/storage_heaters_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,9 @@
expect(page).to have_css('#chart_wrapper_storage_heater_group_by_week_long_term')
expect(page).to have_css('#chart_wrapper_heating_on_off_by_week_storage_heater')
expect(page).to have_css('#chart_wrapper_storage_heater_thermostatic')
within '#chart_wrapper_storage_heater_thermostatic' do
expect(page).not_to have_css(".axis-choice")
end
expect(page).to have_content("Storage heater use during holidays")
expect(page).to have_content(Date.new(2021, 12, 18).to_s(:es_short))
end
Expand Down
6 changes: 6 additions & 0 deletions spec/system/schools/advice_pages/thermostatic_control_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,12 @@
expect(page).to have_content("Your school's R² value is 0.67 which is about average")
expect(page).to have_css('#chart_wrapper_thermostatic_up_to_1_year')
expect(page).to have_css('#chart_wrapper_thermostatic_control_large_diurnal_range')

['#chart_wrapper_thermostatic_up_to_1_year', '#chart_wrapper_thermostatic_control_large_diurnal_range'].each do |chart_type|
within chart_type do
expect(page).not_to have_css(".axis-choice")
end
end
end
end

Expand Down

0 comments on commit 1d62f01

Please sign in to comment.