Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2022-11-28 09:10:35 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2022-11-28 09:10:35 +0300
commit787981be19177a149a901e873f199331ecb873d4 (patch)
tree163ab57eb1883827dd76a029fabb98a4d7b620c1 /spec/features/runners_spec.rb
parent583699499eb9f56c83563045fdd83f7ae896c082 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/features/runners_spec.rb')
-rw-r--r--spec/features/runners_spec.rb34
1 files changed, 32 insertions, 2 deletions
diff --git a/spec/features/runners_spec.rb b/spec/features/runners_spec.rb
index b732fafe571..b971663781c 100644
--- a/spec/features/runners_spec.rb
+++ b/spec/features/runners_spec.rb
@@ -123,7 +123,15 @@ RSpec.describe 'Runners' do
end
context 'when multiple shared runners are configured' do
- let!(:shared_runner_2) { create(:ci_runner, :instance) }
+ let_it_be(:shared_runner_2) { create(:ci_runner, :instance) }
+
+ it 'shows the runner count' do
+ visit project_runners_path(project)
+
+ within '[data-testid="available-shared-runners"]' do
+ expect(page).to have_content format(_('Available shared runners: %{count}'), { count: 2 })
+ end
+ end
it 'adds pagination to the shared runner list' do
stub_const('Projects::Settings::CiCdController::NUMBER_OF_RUNNERS_PER_PAGE', 1)
@@ -322,7 +330,7 @@ RSpec.describe 'Runners' do
end
context 'project with a group and a group runner' do
- let_it_be(:ci_runner) do
+ let_it_be(:group_runner) do
create(:ci_runner, :group, groups: [group], description: 'group-runner')
end
@@ -346,6 +354,28 @@ RSpec.describe 'Runners' do
expect(page).to have_content 'Disable group runners'
expect(project.reload.group_runners_enabled).to be true
end
+
+ context 'when multiple group runners are configured' do
+ let_it_be(:group_runner_2) { create(:ci_runner, :group, groups: [group]) }
+
+ it 'shows the runner count' do
+ visit project_runners_path(project)
+
+ within '[data-testid="group-runners"]' do
+ expect(page).to have_content format(_('Available group runners: %{runners}'), { runners: 2 })
+ end
+ end
+
+ it 'adds pagination to the group runner list' do
+ stub_const('Projects::Settings::CiCdController::NUMBER_OF_RUNNERS_PER_PAGE', 1)
+
+ visit project_runners_path(project)
+
+ within '[data-testid="group-runners"]' do
+ expect(find('.pagination')).not_to be_nil
+ end
+ end
+ end
end
end
end