diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2019-10-30 03:07:52 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2019-10-30 03:07:52 +0300 |
commit | 4c016ad02422709d3a341215952a9b1cdb4a8451 (patch) | |
tree | 599e58df9e1f8987a9f9400b0abf61612e4e125a /spec/features/projects/settings | |
parent | cb3e6b9c1b020378b5f94b4c38319a2dc961de01 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/features/projects/settings')
-rw-r--r-- | spec/features/projects/settings/operations_settings_spec.rb | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/spec/features/projects/settings/operations_settings_spec.rb b/spec/features/projects/settings/operations_settings_spec.rb index d96e243d96b..ca937651af8 100644 --- a/spec/features/projects/settings/operations_settings_spec.rb +++ b/spec/features/projects/settings/operations_settings_spec.rb @@ -102,5 +102,40 @@ describe 'Projects > Settings > For a forked project', :js do end end end + + context 'grafana integration settings form' do + it 'is not present when the feature flag is disabled' do + stub_feature_flags(gfm_grafana_integration: false) + + visit project_settings_operations_path(project) + + wait_for_requests + + expect(page).to have_no_css('.js-grafana-integration') + end + + it 'is present when the feature flag is enabled' do + visit project_settings_operations_path(project) + + wait_for_requests + + within '.js-grafana-integration' do + click_button('Expand') + end + + expect(page).to have_content('Grafana URL') + expect(page).to have_content('API Token') + expect(page).to have_button('Save Changes') + + fill_in('grafana-url', with: 'http://gitlab-test.grafana.net') + fill_in('grafana-token', with: 'token') + + click_button('Save Changes') + + wait_for_requests + + assert_text('Your changes have been saved') + end + end end end |