Commit 819ae974 authored by Filipa Lacerda's avatar Filipa Lacerda

Fix broken tests

Fix linter error
parent 4983fbaa
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
- subject = local_assigns.fetch(:subject) - subject = local_assigns.fetch(:subject)
- status = subject.detailed_status(current_user) - status = subject.detailed_status(current_user)
- klass = "ci-status-icon ci-status-icon-#{status.group}" - klass = "ci-status-icon ci-status-icon-#{status.group} js-ci-status-icon-#{status.group}"
- tooltip = "#{subject.name} - #{status.label}" - tooltip = "#{subject.name} - #{status.label}"
- if status.has_details? - if status.has_details?
...@@ -16,5 +16,5 @@ ...@@ -16,5 +16,5 @@
- if status.has_action? - if status.has_action?
= link_to status.action_path, class: 'ci-action-icon-container has-tooltip', method: status.action_method, data: { toggle: 'tooltip', title: status.action_title } do = link_to status.action_path, class: 'ci-action-icon-container has-tooltip', method: status.action_method, data: { toggle: 'tooltip', title: status.action_title } do
%i.ci-action-icon-wrapper %i.ci-action-icon-wrapper{ class: "js-#{status.action_icon}" }
= custom_icon(status.action_icon) = custom_icon(status.action_icon)
...@@ -66,8 +66,8 @@ describe 'Pipeline', :feature, :js do ...@@ -66,8 +66,8 @@ describe 'Pipeline', :feature, :js do
context 'when pipeline has running builds' do context 'when pipeline has running builds' do
it 'shows a running icon and a cancel action for the running build' do it 'shows a running icon and a cancel action for the running build' do
page.within('#ci-badge-deploy') do page.within('#ci-badge-deploy') do
expect(page).to have_selector('.ci-status-icon-running') expect(page).to have_selector('.js-ci-status-icon-running')
expect(page).to have_selector('.ci-action-icon-container .fa-ban') expect(page).to have_selector('.js-icon_action_cancel')
expect(page).to have_content('deploy') expect(page).to have_content('deploy')
end end
end end
...@@ -82,12 +82,12 @@ describe 'Pipeline', :feature, :js do ...@@ -82,12 +82,12 @@ describe 'Pipeline', :feature, :js do
context 'when pipeline has successful builds' do context 'when pipeline has successful builds' do
it 'shows the success icon and a retry action for the successful build' do it 'shows the success icon and a retry action for the successful build' do
page.within('#ci-badge-build') do page.within('#ci-badge-build') do
expect(page).to have_selector('.ci-status-icon-success') expect(page).to have_selector('.js-ci-status-icon-success')
expect(page).to have_content('build') expect(page).to have_content('build')
end end
page.within('#ci-badge-build .ci-action-icon-container') do page.within('#ci-badge-build .ci-action-icon-container') do
expect(page).to have_selector('.ci-action-icon-container .fa-refresh') expect(page).to have_selector('.js-icon_action_retry')
end end
end end
...@@ -101,12 +101,12 @@ describe 'Pipeline', :feature, :js do ...@@ -101,12 +101,12 @@ describe 'Pipeline', :feature, :js do
context 'when pipeline has failed builds' do context 'when pipeline has failed builds' do
it 'shows the failed icon and a retry action for the failed build' do it 'shows the failed icon and a retry action for the failed build' do
page.within('#ci-badge-test') do page.within('#ci-badge-test') do
expect(page).to have_selector('.ci-status-icon-failed') expect(page).to have_selector('.js-ci-status-icon-failed')
expect(page).to have_content('test') expect(page).to have_content('test')
end end
page.within('#ci-badge-test .ci-action-icon-container') do page.within('#ci-badge-test .ci-action-icon-container') do
expect(page).to have_selector('.ci-action-icon-container .fa-refresh') expect(page).to have_selector('.js-icon_action_retry')
end end
end end
...@@ -120,12 +120,12 @@ describe 'Pipeline', :feature, :js do ...@@ -120,12 +120,12 @@ describe 'Pipeline', :feature, :js do
context 'when pipeline has manual builds' do context 'when pipeline has manual builds' do
it 'shows the skipped icon and a play action for the manual build' do it 'shows the skipped icon and a play action for the manual build' do
page.within('#ci-badge-manual-build') do page.within('#ci-badge-manual-build') do
expect(page).to have_selector('.ci-status-icon-manual') expect(page).to have_selector('.js-ci-status-icon-manual')
expect(page).to have_content('manual') expect(page).to have_content('manual')
end end
page.within('#ci-badge-manual-build .ci-action-icon-container') do page.within('#ci-badge-manual-build .ci-action-icon-container') do
expect(page).to have_selector('.ci-action-icon-container .fa-play') expect(page).to have_selector('.js-icon_action_play')
end end
end end
...@@ -138,7 +138,7 @@ describe 'Pipeline', :feature, :js do ...@@ -138,7 +138,7 @@ describe 'Pipeline', :feature, :js do
context 'when pipeline has external build' do context 'when pipeline has external build' do
it 'shows the success icon and the generic comit status build' do it 'shows the success icon and the generic comit status build' do
expect(page).to have_selector('.ci-status-icon-success') expect(page).to have_selector('.js-ci-status-icon-success')
expect(page).to have_content('jenkins') expect(page).to have_content('jenkins')
expect(page).to have_link('jenkins', href: 'http://gitlab.com/status') expect(page).to have_link('jenkins', href: 'http://gitlab.com/status')
end end
......
...@@ -62,7 +62,7 @@ describe Gitlab::Ci::Status::Build::Cancelable do ...@@ -62,7 +62,7 @@ describe Gitlab::Ci::Status::Build::Cancelable do
end end
describe '#action_icon' do describe '#action_icon' do
it { expect(subject.action_icon).to eq 'ban' } it { expect(subject.action_icon).to eq 'icon_action_cancel' }
end end
describe '#action_title' do describe '#action_title' do
......
...@@ -44,7 +44,7 @@ describe Gitlab::Ci::Status::Build::Play do ...@@ -44,7 +44,7 @@ describe Gitlab::Ci::Status::Build::Play do
end end
describe '#action_icon' do describe '#action_icon' do
it { expect(subject.action_icon).to eq 'play' } it { expect(subject.action_icon).to eq 'icon_action_play' }
end end
describe '#action_title' do describe '#action_title' do
......
...@@ -62,7 +62,7 @@ describe Gitlab::Ci::Status::Build::Retryable do ...@@ -62,7 +62,7 @@ describe Gitlab::Ci::Status::Build::Retryable do
end end
describe '#action_icon' do describe '#action_icon' do
it { expect(subject.action_icon).to eq 'refresh' } it { expect(subject.action_icon).to eq 'icon_action_retry' }
end end
describe '#action_title' do describe '#action_title' do
......
...@@ -46,7 +46,7 @@ describe Gitlab::Ci::Status::Build::Stop do ...@@ -46,7 +46,7 @@ describe Gitlab::Ci::Status::Build::Stop do
end end
describe '#action_icon' do describe '#action_icon' do
it { expect(subject.action_icon).to eq 'stop' } it { expect(subject.action_icon).to eq 'icon_action_stop' }
end end
describe '#action_title' do describe '#action_title' 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