diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-07-20 18:40:28 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-07-20 18:40:28 +0300 |
commit | b595cb0c1dec83de5bdee18284abe86614bed33b (patch) | |
tree | 8c3d4540f193c5ff98019352f554e921b3a41a72 /spec/features/groups/group_runners_spec.rb | |
parent | 2f9104a328fc8a4bddeaa4627b595166d24671d0 (diff) |
Add latest changes from gitlab-org/gitlab@15-2-stable-eev15.2.0-rc42
Diffstat (limited to 'spec/features/groups/group_runners_spec.rb')
-rw-r--r-- | spec/features/groups/group_runners_spec.rb | 44 |
1 files changed, 42 insertions, 2 deletions
diff --git a/spec/features/groups/group_runners_spec.rb b/spec/features/groups/group_runners_spec.rb index a60b8a60da0..a129db6cb6f 100644 --- a/spec/features/groups/group_runners_spec.rb +++ b/spec/features/groups/group_runners_spec.rb @@ -17,7 +17,7 @@ RSpec.describe "Group Runners" do describe "Group runners page", :js do let!(:group_registration_token) { group.runners_token } - context "runners registration" do + describe "runners registration" do before do visit group_runners_path(group) end @@ -128,7 +128,7 @@ RSpec.describe "Group Runners" do end end - context 'filtered search' do + describe 'filtered search' do before do visit group_runners_path(group) end @@ -182,5 +182,45 @@ RSpec.describe "Group Runners" do end end end + + context 'when group_runner_view_ui is enabled' do + before do + stub_feature_flags(group_runner_view_ui: true) + end + + it 'user views runner details' do + visit group_runner_path(group, runner) + + expect(page).to have_content "#{s_('Runners|Description')} runner-foo" + end + + it 'user edits the runner to be protected' do + visit edit_group_runner_path(group, runner) + + expect(page.find_field('runner[access_level]')).not_to be_checked + + check 'runner_access_level' + click_button _('Save changes') + + expect(page).to have_content "#{s_('Runners|Configuration')} #{s_('Runners|Protected')}" + end + + context 'when a runner has a tag' do + before do + runner.update!(tag_list: ['tag']) + end + + it 'user edits runner not to run untagged jobs' do + visit edit_group_runner_path(group, runner) + + page.find_field('runner[tag_list]').set('tag, tag2') + + uncheck 'runner_run_untagged' + click_button _('Save changes') + + expect(page).to have_content "#{s_('Runners|Tags')} tag tag2" + end + end + end end end |