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:
Diffstat (limited to 'spec/features/admin/admin_runners_spec.rb')
-rw-r--r--spec/features/admin/admin_runners_spec.rb58
1 files changed, 31 insertions, 27 deletions
diff --git a/spec/features/admin/admin_runners_spec.rb b/spec/features/admin/admin_runners_spec.rb
index 4e0dcbdf075..d7a267fec69 100644
--- a/spec/features/admin/admin_runners_spec.rb
+++ b/spec/features/admin/admin_runners_spec.rb
@@ -17,6 +17,10 @@ RSpec.describe "Admin Runners" do
describe "Runners page" do
let(:pipeline) { create(:ci_pipeline) }
+ before do
+ stub_feature_flags(runner_list_view_vue_ui: false)
+ end
+
context "when there are runners" do
it 'has all necessary texts' do
runner = create(:ci_runner, contacted_at: Time.now)
@@ -240,7 +244,7 @@ RSpec.describe "Admin Runners" do
it 'shows the label and does not show the project count' do
visit admin_runners_path
- within "#runner_#{runner.id}" do
+ within "[data-testid='runner-row-#{runner.id}']" do
expect(page).to have_selector '.badge', text: 'group'
expect(page).to have_text 'n/a'
end
@@ -253,7 +257,7 @@ RSpec.describe "Admin Runners" do
visit admin_runners_path
- within "#runner_#{runner.id}" do
+ within "[data-testid='runner-row-#{runner.id}']" do
expect(page).to have_selector '.badge', text: 'shared'
expect(page).to have_text 'n/a'
end
@@ -267,12 +271,36 @@ RSpec.describe "Admin Runners" do
visit admin_runners_path
- within "#runner_#{runner.id}" do
+ within "[data-testid='runner-row-#{runner.id}']" do
expect(page).to have_selector '.badge', text: 'specific'
expect(page).to have_text '1'
end
end
end
+
+ describe 'runners registration token' do
+ let!(:token) { Gitlab::CurrentSettings.runners_registration_token }
+
+ before do
+ visit admin_runners_path
+ end
+
+ it 'has a registration token' do
+ expect(page.find('[data-testid="registration_token"]')).to have_content(token)
+ end
+
+ describe 'reset registration token' do
+ let(:page_token) { find('[data-testid="registration_token"]').text }
+
+ before do
+ click_button 'Reset registration token'
+ end
+
+ it 'changes registration token' do
+ expect(page_token).not_to eq token
+ end
+ end
+ end
end
describe "Runner show page" do
@@ -381,28 +409,4 @@ RSpec.describe "Admin Runners" do
end
end
end
-
- describe 'runners registration token' do
- let!(:token) { Gitlab::CurrentSettings.runners_registration_token }
-
- before do
- visit admin_runners_path
- end
-
- it 'has a registration token' do
- expect(page.find('#registration_token')).to have_content(token)
- end
-
- describe 'reload registration token' do
- let(:page_token) { find('#registration_token').text }
-
- before do
- click_button 'Reset registration token'
- end
-
- it 'changes registration token' do
- expect(page_token).not_to eq token
- end
- end
- end
end