Commit e4580caf authored by Stan Hu's avatar Stan Hu

Merge branch...

Merge branch '336405-feature-flag-rollout-of-groups-runners-as-a-first-class-citizen-runner_list_group_view_vue_ui' into 'master'

Remove runner list in group settings

See merge request gitlab-org/gitlab!84165
parents 7d30cad5 be34638c
- if Feature.enabled?(:runner_list_group_view_vue_ui, @group, default_enabled: :yaml)
.gl-mb-6
#update-shared-runners-form{ data: group_shared_runners_settings_data(@group) }
.gl-card.gl-px-8.gl-py-6.gl-line-height-20
.gl-card-body.gl-display-flex{ :class => "gl-p-0!" }
.gl-banner-illustration
......@@ -11,22 +13,22 @@
%a.btn.btn-confirm.btn-md.gl-button{ :href => group_runners_path(@group) }
%span.gl-button-text
= s_('Runners|Take me there!')
- else
= render 'shared/runners/runner_description'
= render 'shared/runners/runner_description'
%hr
%hr
.row
.row
.col-sm-6
= render 'groups/runners/group_runners'
.col-sm-6
= render 'groups/runners/shared_runners'
%h4.underlined-title
%h4.underlined-title
= _('Available runners: %{runners}').html_safe % { runners: limited_counter_with_delimiter(@all_group_runners) }
-# haml-lint:disable NoPlainNodes
.row
-# haml-lint:disable NoPlainNodes
.row
.col-sm-9
= form_tag group_settings_ci_cd_path, id: 'runners-search', method: :get, class: 'filter-form js-filter-form' do
.filtered-search-wrapper.d-flex
......@@ -95,7 +97,7 @@
= _('Runners currently online: %{active_runners_count}') % { active_runners_count: limited_counter_with_delimiter(@all_group_runners.online) }
- if @group_runners.any?
- if @group_runners.any?
.content-list{ data: { testid: 'runners-table' } }
.table-holder
.gl-responsive-table-row.table-row-header{ role: 'row' }
......@@ -113,5 +115,5 @@
- runner = runner.present(current_user: current_user)
= render 'groups/runners/runner', runner: runner
= paginate @group_runners, theme: 'gitlab', :params => { :anchor => 'runners-settings' }
- else
- else
.nothing-here-block= _('No runners found')
......@@ -5,40 +5,59 @@ require 'spec_helper'
RSpec.describe 'Group CI/CD settings' do
include WaitForRequests
let(:user) { create(:user) }
let(:group) { create(:group) }
let_it_be(:user) { create(:user) }
let_it_be(:group, reload: true) { create(:group) }
before do
before_all do
group.add_owner(user)
end
before do
sign_in(user)
end
describe 'new group runners view banner' do
it 'displays banner' do
describe 'Runners section' do
let(:shared_runners_toggle) { page.find('[data-testid="enable-runners-toggle"]') }
context 'with runner_list_group_view_vue_ui enabled' do
before do
visit group_settings_ci_cd_path(group)
end
it 'displays the new group runners view banner' do
expect(page).to have_content(s_('Runners|New group runners view'))
expect(page).to have_link(href: group_runners_path(group))
end
it 'does not display banner' do
it 'has "Enable shared runners for this group" toggle', :js do
expect(shared_runners_toggle).to have_content(_('Enable shared runners for this group'))
end
end
context 'with runner_list_group_view_vue_ui disabled' do
before do
stub_feature_flags(runner_list_group_view_vue_ui: false)
visit group_settings_ci_cd_path(group)
end
it 'does not display the new group runners view banner' do
expect(page).not_to have_content(s_('Runners|New group runners view'))
expect(page).not_to have_link(href: group_runners_path(group))
end
it 'has "Enable shared runners for this group" toggle', :js do
expect(shared_runners_toggle).to have_content(_('Enable shared runners for this group'))
end
describe 'runners registration token' do
context 'with runners registration token' do
let!(:token) { group.runners_token }
before do
visit group_settings_ci_cd_path(group)
end
it 'has a registration token' do
it 'displays the registration token' do
expect(page.find('#registration_token')).to have_content(token)
end
......@@ -49,11 +68,13 @@ RSpec.describe 'Group CI/CD settings' do
click_button 'Reset registration token'
end
it 'changes registration token' do
it 'changes the registration token' do
expect(page_token).not_to eq token
end
end
end
end
end
describe 'Auto DevOps form' do
before do
......
......@@ -352,6 +352,7 @@ RSpec.describe 'Runners' do
before do
group.add_owner(user)
stub_feature_flags(runner_list_group_view_vue_ui: false)
end
context 'group with no runners' do
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment