Commit 1b6d1a56 authored by Nicolò Maria Mezzopera's avatar Nicolò Maria Mezzopera

Merge branch 'remove-pipeline-js-classes' into 'master'

Clean up js-* classes from pipeline_url.vue

See merge request gitlab-org/gitlab!50244
parents 589dce6d 794776d5
...@@ -50,7 +50,6 @@ export default { ...@@ -50,7 +50,6 @@ export default {
<div class="table-section section-10 d-none d-md-block pipeline-tags"> <div class="table-section section-10 d-none d-md-block pipeline-tags">
<gl-link <gl-link
:href="pipeline.path" :href="pipeline.path"
class="js-pipeline-url-link js-onboarding-pipeline-item"
data-testid="pipeline-url-link" data-testid="pipeline-url-link"
data-qa-selector="pipeline_url_link" data-qa-selector="pipeline_url_link"
> >
...@@ -70,7 +69,7 @@ export default { ...@@ -70,7 +69,7 @@ export default {
v-if="pipeline.flags.latest" v-if="pipeline.flags.latest"
v-gl-tooltip v-gl-tooltip
:title="__('Latest pipeline for the most recent commit on this branch')" :title="__('Latest pipeline for the most recent commit on this branch')"
class="js-pipeline-url-latest badge badge-success" class="badge badge-success"
data-testid="pipeline-url-latest" data-testid="pipeline-url-latest"
>{{ __('latest') }}</span >{{ __('latest') }}</span
> >
...@@ -78,7 +77,7 @@ export default { ...@@ -78,7 +77,7 @@ export default {
v-if="pipeline.flags.yaml_errors" v-if="pipeline.flags.yaml_errors"
v-gl-tooltip v-gl-tooltip
:title="pipeline.yaml_errors" :title="pipeline.yaml_errors"
class="js-pipeline-url-yaml badge badge-danger" class="badge badge-danger"
data-testid="pipeline-url-yaml" data-testid="pipeline-url-yaml"
>{{ __('yaml invalid') }}</span >{{ __('yaml invalid') }}</span
> >
...@@ -86,7 +85,7 @@ export default { ...@@ -86,7 +85,7 @@ export default {
v-if="pipeline.flags.failure_reason" v-if="pipeline.flags.failure_reason"
v-gl-tooltip v-gl-tooltip
:title="pipeline.failure_reason" :title="pipeline.failure_reason"
class="js-pipeline-url-failure badge badge-danger" class="badge badge-danger"
data-testid="pipeline-url-failure" data-testid="pipeline-url-failure"
>{{ __('error') }}</span >{{ __('error') }}</span
> >
...@@ -94,7 +93,7 @@ export default { ...@@ -94,7 +93,7 @@ export default {
v-if="pipeline.flags.auto_devops" v-if="pipeline.flags.auto_devops"
:id="`pipeline-url-autodevops-${pipeline.id}`" :id="`pipeline-url-autodevops-${pipeline.id}`"
tabindex="0" tabindex="0"
class="js-pipeline-url-autodevops badge badge-info autodevops-badge" class="badge badge-info autodevops-badge"
data-testid="pipeline-url-autodevops" data-testid="pipeline-url-autodevops"
role="button" role="button"
>{{ __('Auto DevOps') }}</gl-link >{{ __('Auto DevOps') }}</gl-link
...@@ -125,7 +124,7 @@ export default { ...@@ -125,7 +124,7 @@ export default {
</gl-popover> </gl-popover>
<span <span
v-if="pipeline.flags.stuck" v-if="pipeline.flags.stuck"
class="js-pipeline-url-stuck badge badge-warning" class="badge badge-warning"
data-testid="pipeline-url-stuck" data-testid="pipeline-url-stuck"
>{{ __('stuck') }}</span >{{ __('stuck') }}</span
> >
...@@ -137,7 +136,7 @@ export default { ...@@ -137,7 +136,7 @@ export default {
'Pipelines for merge requests are configured. A detached pipeline runs in the context of the merge request, and not against the merged result. Learn more in the documentation for Pipelines for Merged Results.', 'Pipelines for merge requests are configured. A detached pipeline runs in the context of the merge request, and not against the merged result. Learn more in the documentation for Pipelines for Merged Results.',
) )
" "
class="js-pipeline-url-detached badge badge-info" class="badge badge-info"
data-testid="pipeline-url-detached" data-testid="pipeline-url-detached"
>{{ __('detached') }}</span >{{ __('detached') }}</span
> >
......
...@@ -62,7 +62,7 @@ RSpec.describe 'Merge request > User sees pipelines triggered by merge request', ...@@ -62,7 +62,7 @@ RSpec.describe 'Merge request > User sees pipelines triggered by merge request',
it 'sees branch pipelines and detached merge request pipelines in correct order' do it 'sees branch pipelines and detached merge request pipelines in correct order' do
page.within('.ci-table') do page.within('.ci-table') do
expect(page).to have_selector('.ci-pending', count: 2) expect(page).to have_selector('.ci-pending', count: 2)
expect(first('.js-pipeline-url-link')).to have_content("##{detached_merge_request_pipeline.id}") expect(first('[data-testid="pipeline-url-link"]')).to have_content("##{detached_merge_request_pipeline.id}")
end end
end end
...@@ -97,16 +97,16 @@ RSpec.describe 'Merge request > User sees pipelines triggered by merge request', ...@@ -97,16 +97,16 @@ RSpec.describe 'Merge request > User sees pipelines triggered by merge request',
page.within('.ci-table') do page.within('.ci-table') do
expect(page).to have_selector('.ci-pending', count: 4) expect(page).to have_selector('.ci-pending', count: 4)
expect(all('.js-pipeline-url-link')[0]) expect(all('[data-testid="pipeline-url-link"]')[0])
.to have_content("##{detached_merge_request_pipeline_2.id}") .to have_content("##{detached_merge_request_pipeline_2.id}")
expect(all('.js-pipeline-url-link')[1]) expect(all('[data-testid="pipeline-url-link"]')[1])
.to have_content("##{detached_merge_request_pipeline.id}") .to have_content("##{detached_merge_request_pipeline.id}")
expect(all('.js-pipeline-url-link')[2]) expect(all('[data-testid="pipeline-url-link"]')[2])
.to have_content("##{push_pipeline_2.id}") .to have_content("##{push_pipeline_2.id}")
expect(all('.js-pipeline-url-link')[3]) expect(all('[data-testid="pipeline-url-link"]')[3])
.to have_content("##{push_pipeline.id}") .to have_content("##{push_pipeline.id}")
end end
end end
...@@ -197,7 +197,7 @@ RSpec.describe 'Merge request > User sees pipelines triggered by merge request', ...@@ -197,7 +197,7 @@ RSpec.describe 'Merge request > User sees pipelines triggered by merge request',
it 'sees a branch pipeline in pipeline tab' do it 'sees a branch pipeline in pipeline tab' do
page.within('.ci-table') do page.within('.ci-table') do
expect(page).to have_selector('.ci-pending', count: 1) expect(page).to have_selector('.ci-pending', count: 1)
expect(first('.js-pipeline-url-link')).to have_content("##{push_pipeline.id}") expect(first('[data-testid="pipeline-url-link"]')).to have_content("##{push_pipeline.id}")
end end
end end
...@@ -246,7 +246,7 @@ RSpec.describe 'Merge request > User sees pipelines triggered by merge request', ...@@ -246,7 +246,7 @@ RSpec.describe 'Merge request > User sees pipelines triggered by merge request',
it 'sees branch pipelines and detached merge request pipelines in correct order' do it 'sees branch pipelines and detached merge request pipelines in correct order' do
page.within('.ci-table') do page.within('.ci-table') do
expect(page).to have_selector('.ci-pending', count: 2) expect(page).to have_selector('.ci-pending', count: 2)
expect(first('.js-pipeline-url-link')).to have_content("##{detached_merge_request_pipeline.id}") expect(first('[data-testid="pipeline-url-link"]')).to have_content("##{detached_merge_request_pipeline.id}")
end end
end end
...@@ -287,16 +287,16 @@ RSpec.describe 'Merge request > User sees pipelines triggered by merge request', ...@@ -287,16 +287,16 @@ RSpec.describe 'Merge request > User sees pipelines triggered by merge request',
page.within('.ci-table') do page.within('.ci-table') do
expect(page).to have_selector('.ci-pending', count: 4) expect(page).to have_selector('.ci-pending', count: 4)
expect(all('.js-pipeline-url-link')[0]) expect(all('[data-testid="pipeline-url-link"]')[0])
.to have_content("##{detached_merge_request_pipeline_2.id}") .to have_content("##{detached_merge_request_pipeline_2.id}")
expect(all('.js-pipeline-url-link')[1]) expect(all('[data-testid="pipeline-url-link"]')[1])
.to have_content("##{detached_merge_request_pipeline.id}") .to have_content("##{detached_merge_request_pipeline.id}")
expect(all('.js-pipeline-url-link')[2]) expect(all('[data-testid="pipeline-url-link"]')[2])
.to have_content("##{push_pipeline_2.id}") .to have_content("##{push_pipeline_2.id}")
expect(all('.js-pipeline-url-link')[3]) expect(all('[data-testid="pipeline-url-link"]')[3])
.to have_content("##{push_pipeline.id}") .to have_content("##{push_pipeline.id}")
end end
end end
......
...@@ -184,7 +184,7 @@ RSpec.describe 'Merge request > User sees pipelines', :js do ...@@ -184,7 +184,7 @@ RSpec.describe 'Merge request > User sees pipelines', :js do
page.within(first('.commit')) do page.within(first('.commit')) do
page.within('.pipeline-tags') do page.within('.pipeline-tags') do
expect(page.find('.js-pipeline-url-link')[:href]).to include(expected_project.full_path) expect(page.find('[data-testid="pipeline-url-link"]')[:href]).to include(expected_project.full_path)
expect(page).to have_content('detached') expect(page).to have_content('detached')
end end
page.within('.pipeline-triggerer') do page.within('.pipeline-triggerer') 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