diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-03-11 21:09:19 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-03-11 21:09:19 +0000 |
commit | fca89bb73ff5b1d14c98c72481f9268fee107ea0 (patch) | |
tree | e1c8a2c4fe5df7f054fd09e49f53bcfb51e51c84 /spec/features | |
parent | 76e9fc7b29c1ce716c26932e9fbec0f3c99f53f4 (diff) | |
download | gitlab-ce-fca89bb73ff5b1d14c98c72481f9268fee107ea0.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/features')
-rw-r--r-- | spec/features/markdown/metrics_spec.rb | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/spec/features/markdown/metrics_spec.rb b/spec/features/markdown/metrics_spec.rb index 81c6b6195c6..6ef4f6ddecc 100644 --- a/spec/features/markdown/metrics_spec.rb +++ b/spec/features/markdown/metrics_spec.rb @@ -62,6 +62,29 @@ describe 'Metrics rendering', :js, :use_clean_rails_memory_store_caching, :sidek expect(page).to have_text(chart_params[:title]) expect(page).to have_text(chart_params[:y_label]) end + + context 'when two dashboard urls are included' do + let(:chart_params_2) do + { + group: 'System metrics (Kubernetes)', + title: 'Core Usage (Total)', + y_label: 'Total Cores' + } + end + let(:metrics_url_2) { urls.metrics_project_environment_url(project, environment, **chart_params_2) } + let(:description) { "See [metrics dashboard](#{metrics_url}) for info. \n See [metrics dashboard](#{metrics_url_2}) for info." } + let(:issue) { create(:issue, project: project, description: description) } + + it 'shows embedded metrics for both urls' do + visit project_issue_path(project, issue) + + expect(page).to have_css('div.prometheus-graph') + expect(page).to have_text(chart_params[:title]) + expect(page).to have_text(chart_params[:y_label]) + expect(page).to have_text(chart_params_2[:title]) + expect(page).to have_text(chart_params_2[:y_label]) + end + end end end |