diff options
author | syasonik <syasonik@gitlab.com> | 2019-08-08 14:33:22 +0300 |
---|---|---|
committer | syasonik <syasonik@gitlab.com> | 2019-08-08 14:33:22 +0300 |
commit | a2305183ce66d545ca5f63f652abbe9c55a0b4f6 (patch) | |
tree | 278e3a8127c957d9a21dbdf3f72d4ca85fc24605 | |
parent | 7aaa352a9cdc37f3289afa2faf3330fd684d723a (diff) | |
download | gitlab-ce-specific-embeds-feature-test.tar.gz |
Add feature test for specific embedsspecific-embeds-feature-test
-rw-r--r-- | spec/features/markdown/metrics_spec.rb | 24 |
1 files changed, 20 insertions, 4 deletions
diff --git a/spec/features/markdown/metrics_spec.rb b/spec/features/markdown/metrics_spec.rb index aa53ac50c78..b083b8aa0b1 100644 --- a/spec/features/markdown/metrics_spec.rb +++ b/spec/features/markdown/metrics_spec.rb @@ -26,13 +26,29 @@ describe 'Metrics rendering', :js, :use_clean_rails_memory_store_caching do restore_host end - context 'with deployments and related deployable present' do - it 'shows embedded metrics' do + it 'shows embedded metrics' do + visit project_issue_path(project, issue) + + expect(page).to have_css('div.prometheus-graph') + expect(page).to have_text('Memory Usage (Total)') + expect(page).to have_text('Core Usage (Total)') + end + + context 'when dashboard params are in included the url' do + let(:metrics_url) { metrics_project_environment_url(project, environment, **chart_params) } + let(:chart_params) do + { + group: 'System metrics (Kubernetes)', + title: 'Memory Usage (Pod average)', + y_label: 'Memory Used per Pod (MB)' + } + end + + it 'shows embedded metrics for the specifiec chart' do visit project_issue_path(project, issue) expect(page).to have_css('div.prometheus-graph') - expect(page).to have_text('Memory Usage (Total)') - expect(page).to have_text('Core Usage (Total)') + expect(page).to have_text(chart_params[:title]) end end |