diff options
author | Tristan Read <tread@gitlab.com> | 2019-01-14 18:46:34 +0100 |
---|---|---|
committer | Peter Leitzen <pleitzen@gitlab.com> | 2019-01-24 08:57:22 +0100 |
commit | 3acab3461f3342e0bca38d553038a574ab398bf6 (patch) | |
tree | c4591eb48ca12f88b478ade146e76ddf436fb661 | |
parent | 253f40ab76c7fbd2ffee3afc4d5b57377327ea60 (diff) | |
download | gitlab-ce-3acab3461f3342e0bca38d553038a574ab398bf6.tar.gz |
Add operations settings toggle test
-rw-r--r-- | spec/features/projects/settings/operations_settings_spec.rb | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/spec/features/projects/settings/operations_settings_spec.rb b/spec/features/projects/settings/operations_settings_spec.rb index 06290c67c70..d3681cdb74d 100644 --- a/spec/features/projects/settings/operations_settings_spec.rb +++ b/spec/features/projects/settings/operations_settings_spec.rb @@ -12,6 +12,28 @@ describe 'Projects > Settings > For a forked project', :js do project.add_role(user, role) end + describe 'Settings > Operations' do + context 'when the error tracking feature flag is enabled' do + it 'renders with the error tracking settings expanded by default' do + visit project_path(project) + '/settings/operations' # TODO: find out the blessed way for url concatenation + wait_for_requests + + expect(page).to have_selector('h4', :text => _("Error Tracking")) + expect(page).to have_selector('label', :text => _("Active")) + end + + it 'collapses the error tracking settings' do + visit project_path(project) + '/settings/operations' # TODO: find out the blessed way for url concatenation + wait_for_requests + + find('button.js-settings-toggle').click + + expect(page).to have_selector('h4', :text => _("Error Tracking")) + expect(page).to have_no_selector('label', :text => _("Active")) + end + end + end + describe 'Sidebar > Operations' do it 'renders the settings link in the sidebar' do visit project_path(project) |