diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-08-12 15:11:05 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-08-12 15:11:05 +0300 |
commit | 2fe5ea34a5f63661a050404d3b5fbe3056a39765 (patch) | |
tree | 630d5b896d2933d38a206abf4e2baf7e1b773027 /spec/features/clusters | |
parent | dcb517514405d6f550cc077686889dbb34c37c75 (diff) |
Add latest changes from gitlab-org/gitlab@master
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..32caad775e4 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' 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 |