diff options
Diffstat (limited to 'spec/features/clusters')
-rw-r--r-- | spec/features/clusters/cluster_health_dashboard_spec.rb | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/spec/features/clusters/cluster_health_dashboard_spec.rb b/spec/features/clusters/cluster_health_dashboard_spec.rb index 20c07f4d6ac..e4a36f654e5 100644 --- a/spec/features/clusters/cluster_health_dashboard_spec.rb +++ b/spec/features/clusters/cluster_health_dashboard_spec.rb @@ -63,21 +63,33 @@ RSpec.describe 'Cluster Health board', :js, :kubeclient, :use_clean_rails_memory context 'connected, prometheus returns data' do before do stub_connected - end - it 'renders charts' do visit cluster_path click_link 'Health' wait_for_requests + end + it 'renders charts' do expect(page).to have_css('.prometheus-graphs') expect(page).to have_css('.prometheus-graph') expect(page).to have_css('.prometheus-graph-title') expect(page).to have_css('[_echarts_instance_]') + expect(page).to have_css('.prometheus-graph', count: 2) expect(page).to have_content('Avg') end + + it 'focuses the single panel on toggle', quarantine: 'https://gitlab.com/gitlab-org/gitlab/-/issues/338341' do + click_button('More actions') + click_button('Expand panel') + + expect(page).to have_css('.prometheus-graph', count: 1) + + click_button('Collapse panel') + + expect(page).to have_css('.prometheus-graph', count: 2) + end end def stub_empty_response |