Commit 1df86110 authored by Natalia Tepluhina's avatar Natalia Tepluhina

Merge branch 'mrincon-data-testid-runner-assigned-projects' into 'master'

Replace CSS classes with data-testid

See merge request gitlab-org/gitlab!58745
parents 84a9c210 2b790d30
......@@ -32,7 +32,7 @@
.col-md-6
%h4= _('Restrict projects for this runner')
- if @runner.projects.any?
%table.table.assigned-projects
%table.table{ data: { testid: 'assigned-projects' } }
%thead
%tr
%th= _('Assigned projects')
......@@ -49,7 +49,7 @@
.gl-alert-actions
= link_to s_('Disable'), admin_namespace_project_runner_project_path(project.namespace, project, runner_project), method: :delete, class: 'btn gl-alert-action btn-info btn-md gl-button'
%table.table.unassigned-projects
%table.table{ data: { testid: 'unassigned-projects' } }
%thead
%tr
%th= _('Project')
......
......@@ -321,11 +321,11 @@ RSpec.describe "Admin Runners" do
describe 'enable/create' do
shared_examples 'assignable runner' do
it 'enables a runner for a project' do
within '.unassigned-projects' do
within '[data-testid="unassigned-projects"]' do
click_on 'Enable'
end
assigned_project = page.find('.assigned-projects')
assigned_project = page.find('[data-testid="assigned-projects"]')
expect(assigned_project).to have_content(@project2.path)
end
......@@ -371,11 +371,11 @@ RSpec.describe "Admin Runners" do
end
it 'enables specific runner for project' do
within '.assigned-projects' do
within '[data-testid="assigned-projects"]' do
click_on 'Disable'
end
new_runner_project = page.find('.unassigned-projects')
new_runner_project = page.find('[data-testid="unassigned-projects"]')
expect(new_runner_project).to have_content(@project1.path)
end
......
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