Commit 2b790d30 authored by Miguel Rincon's avatar Miguel Rincon

Replace CSS classes with data-testid

parent 987be4a5
...@@ -32,7 +32,7 @@ ...@@ -32,7 +32,7 @@
.col-md-6 .col-md-6
%h4= _('Restrict projects for this runner') %h4= _('Restrict projects for this runner')
- if @runner.projects.any? - if @runner.projects.any?
%table.table.assigned-projects %table.table{ data: { testid: 'assigned-projects' } }
%thead %thead
%tr %tr
%th= _('Assigned projects') %th= _('Assigned projects')
...@@ -49,7 +49,7 @@ ...@@ -49,7 +49,7 @@
.gl-alert-actions .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' = 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 %thead
%tr %tr
%th= _('Project') %th= _('Project')
......
...@@ -321,11 +321,11 @@ RSpec.describe "Admin Runners" do ...@@ -321,11 +321,11 @@ RSpec.describe "Admin Runners" do
describe 'enable/create' do describe 'enable/create' do
shared_examples 'assignable runner' do shared_examples 'assignable runner' do
it 'enables a runner for a project' do it 'enables a runner for a project' do
within '.unassigned-projects' do within '[data-testid="unassigned-projects"]' do
click_on 'Enable' click_on 'Enable'
end end
assigned_project = page.find('.assigned-projects') assigned_project = page.find('[data-testid="assigned-projects"]')
expect(assigned_project).to have_content(@project2.path) expect(assigned_project).to have_content(@project2.path)
end end
...@@ -371,11 +371,11 @@ RSpec.describe "Admin Runners" do ...@@ -371,11 +371,11 @@ RSpec.describe "Admin Runners" do
end end
it 'enables specific runner for project' do it 'enables specific runner for project' do
within '.assigned-projects' do within '[data-testid="assigned-projects"]' do
click_on 'Disable' click_on 'Disable'
end 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) expect(new_runner_project).to have_content(@project1.path)
end 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