diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-05-19 10:33:21 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-05-19 10:33:21 +0300 |
commit | 36a59d088eca61b834191dacea009677a96c052f (patch) | |
tree | e4f33972dab5d8ef79e3944a9f403035fceea43f /spec/features/runners_spec.rb | |
parent | a1761f15ec2cae7c7f7bbda39a75494add0dfd6f (diff) |
Add latest changes from gitlab-org/gitlab@15-0-stable-eev15.0.0-rc42
Diffstat (limited to 'spec/features/runners_spec.rb')
-rw-r--r-- | spec/features/runners_spec.rb | 202 |
1 files changed, 0 insertions, 202 deletions
diff --git a/spec/features/runners_spec.rb b/spec/features/runners_spec.rb index 2dddcd62a6c..534da71e39a 100644 --- a/spec/features/runners_spec.rb +++ b/spec/features/runners_spec.rb @@ -346,206 +346,4 @@ RSpec.describe 'Runners' do end end end - - context 'group runners in group settings' do - let(:group) { create(:group) } - - before do - group.add_owner(user) - stub_feature_flags(runner_list_group_view_vue_ui: false) - end - - context 'group with no runners' do - it 'there are no runners displayed' do - visit group_settings_ci_cd_path(group) - - expect(page).to have_content 'No runners found' - end - end - - context 'group with a runner' do - let!(:runner) { create(:ci_runner, :group, groups: [group], description: 'group-runner') } - - it 'the runner is visible' do - visit group_settings_ci_cd_path(group) - - expect(page).not_to have_content 'No runners found' - expect(page).to have_content 'Available runners: 1' - expect(page).to have_content 'group-runner' - end - - it 'user can pause and resume the group runner' do - visit group_settings_ci_cd_path(group) - - expect(page).to have_link href: pause_group_runner_path(group, runner) - expect(page).not_to have_link href: resume_group_runner_path(group, runner) - - click_link href: pause_group_runner_path(group, runner) - - expect(page).not_to have_link href: pause_group_runner_path(group, runner) - expect(page).to have_link href: resume_group_runner_path(group, runner) - - click_link href: resume_group_runner_path(group, runner) - - expect(page).to have_link href: pause_group_runner_path(group, runner) - expect(page).not_to have_link href: resume_group_runner_path(group, runner) - end - - it 'user can view runner details' do - visit group_settings_ci_cd_path(group) - - expect(page).to have_content(runner.display_name) - - click_on runner.short_sha - - expect(page).to have_content(runner.platform) - end - - it 'user can remove a group runner' do - visit group_settings_ci_cd_path(group) - - all(:link, href: group_runner_path(group, runner))[1].click - - expect(page).not_to have_content(runner.display_name) - end - - it 'user edits the runner to be protected' do - visit group_settings_ci_cd_path(group) - - click_link href: 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 'Protected Yes' - 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 group_settings_ci_cd_path(group) - - click_link href: edit_group_runner_path(group, runner) - - expect(page.find_field('runner[run_untagged]')).to be_checked - - uncheck 'runner_run_untagged' - click_button 'Save changes' - - expect(page).to have_content 'Can run untagged jobs No' - end - end - end - - context 'group with a project runner' do - let(:project) { create(:project, group: group) } - let!(:runner) { create(:ci_runner, :project, projects: [project], description: 'project-runner') } - - it 'the runner is visible' do - visit group_settings_ci_cd_path(group) - - expect(page).not_to have_content 'No runners found' - expect(page).to have_content 'Available runners: 1' - expect(page).to have_content 'project-runner' - end - - it 'user can pause and resume the project runner' do - visit group_settings_ci_cd_path(group) - - expect(page).to have_link href: pause_group_runner_path(group, runner) - expect(page).not_to have_link href: resume_group_runner_path(group, runner) - - click_link href: pause_group_runner_path(group, runner) - - expect(page).not_to have_link href: pause_group_runner_path(group, runner) - expect(page).to have_link href: resume_group_runner_path(group, runner) - - click_link href: resume_group_runner_path(group, runner) - - expect(page).to have_link href: pause_group_runner_path(group, runner) - expect(page).not_to have_link href: resume_group_runner_path(group, runner) - end - - it 'user can view runner details' do - visit group_settings_ci_cd_path(group) - - expect(page).to have_content(runner.display_name) - - click_on runner.short_sha - - expect(page).to have_content(runner.platform) - end - - it 'user can remove a project runner' do - visit group_settings_ci_cd_path(group) - - all(:link, href: group_runner_path(group, runner))[1].click - - expect(page).not_to have_content(runner.display_name) - end - - it 'user edits the runner to be protected' do - visit group_settings_ci_cd_path(group) - - click_link href: 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 'Protected Yes' - 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 group_settings_ci_cd_path(group) - - click_link href: edit_group_runner_path(group, runner) - - expect(page.find_field('runner[run_untagged]')).to be_checked - - uncheck 'runner_run_untagged' - click_button 'Save changes' - - expect(page).to have_content 'Can run untagged jobs No' - end - end - end - - context 'group with a multi-project runner' do - let(:project) { create(:project, group: group) } - let(:project_2) { create(:project, group: group) } - let!(:runner) { create(:ci_runner, :project, projects: [project, project_2], description: 'group-runner') } - - it 'user cannot remove the project runner' do - visit group_settings_ci_cd_path(group) - - expect(all(:link, href: group_runner_path(group, runner)).length).to eq(1) - end - end - - context 'filtered search' do - it 'allows user to search by status and type', :js do - visit group_settings_ci_cd_path(group) - - find('.filtered-search').click - - page.within('#js-dropdown-hint') do - expect(page).to have_content('Status') - expect(page).to have_content('Type') - expect(page).not_to have_content('Tag') - end - end - end - end end |