diff --git a/app/views/dashboard/index.html.erb b/app/views/dashboard/index.html.erb index c30d2e3c..2ef21b2b 100644 --- a/app/views/dashboard/index.html.erb +++ b/app/views/dashboard/index.html.erb @@ -90,3 +90,5 @@ <%= render partial: "variance_chart", locals: { presenters: @variance_chart_row_presenters} %> + +<%= render partial: 'layouts/empty_dataset_modal' if @has_empty_dataset %> diff --git a/app/views/layouts/application.html.erb b/app/views/layouts/application.html.erb index 2c33ca5f..c0630e2f 100644 --- a/app/views/layouts/application.html.erb +++ b/app/views/layouts/application.html.erb @@ -33,7 +33,5 @@ <%= render partial: 'layouts/footer' %> -<%= render partial: 'layouts/empty_dataset_modal' if @has_empty_dataset %> - diff --git a/spec/system/sqm_application_spec.rb b/spec/system/sqm_application_spec.rb index e3dbc4e7..f53b1bfd 100644 --- a/spec/system/sqm_application_spec.rb +++ b/spec/system/sqm_application_spec.rb @@ -13,11 +13,14 @@ describe 'SQM Application' do end context 'when no measures meet their threshold' do - it 'shows a modal on all pages' do - [dashboard_path, browse_path].each do |path| - visit path - expect(page).to have_css '.modal' - end + it 'shows a modal on dashboard page' do + visit dashboard_path + expect(page).to have_css '.modal' + end + + it 'does not show a modal on the browse page' do + visit browse_path + expect(page).not_to have_css '.modal' end end