Skip to content

Commit

Permalink
refactoring: removing TODOs and renaming ascor bubble chart folder
Browse files Browse the repository at this point in the history
  • Loading branch information
martintomas committed Oct 5, 2023
1 parent 8041456 commit d7230fb
Show file tree
Hide file tree
Showing 8 changed files with 13 additions and 8 deletions.
7 changes: 1 addition & 6 deletions app/views/tpi/ascor/_bubble_chart.html.erb
Original file line number Diff line number Diff line change
@@ -1,6 +1 @@
<!-- TODO: React components need to be replaced!!! -->
<%#= react_component('charts/country-bubble/Chart', { results: @ascor_assessment_results }) %>
<%= react_component('charts/country-bubble/Chart', {
results: @ascor_assessment_results,
# disabled_bubbles_areas: BankAssessmentIndicator.area.where(is_placeholder: true).pluck(:text)
}) %>
<%= react_component('charts/ascor-bubble/Chart', { results: @ascor_assessment_results }) %>
2 changes: 0 additions & 2 deletions app/views/tpi/ascor/index.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,6 @@
</div>
</div>

<!-- TODO: Finalise bubble chart section -->
<!-- All React components code (even mobile one) goes into tpi/ascor/bubble_chart partial -->
<section class="container">
<div class="bubble-chart-header">
<h2 class="is-size-4">
Expand Down
12 changes: 12 additions & 0 deletions spec/system/public/tpi/ascor_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,18 @@
it 'loads the page' do
expect(page).to have_text('All countries')
end

it 'loads bubble chart' do
within '.bubble-chart__container' do
expect(page).to have_text('1. Emissions Pathways')
expect(page).to have_text('2. Climate Policies')
expect(page).to have_text('3. Climate Finance')

expect(page).to have_text('EP 1. Emissions Trends')
expect(page).to have_text('CP 1. Climate Legislation')
expect(page).to have_text('CF 1. International Climate Finance')
end
end
end

describe 'single country page' do
Expand Down

0 comments on commit d7230fb

Please sign in to comment.