Commit b4f18a30 authored by Filipa Lacerda's avatar Filipa Lacerda

Adds tests for the status and actions icons rendered in the pipeline graph

Fix padding in dropdown
parent 2320a5c7
...@@ -646,10 +646,6 @@ ...@@ -646,10 +646,6 @@
.dropdown-build { .dropdown-build {
color: $gl-text-color-light; color: $gl-text-color-light;
a {
padding: 6px 8px 7px;
}
a.ci-action-icon-container { a.ci-action-icon-container {
padding: 0; padding: 0;
font-size: 11px; font-size: 11px;
......
...@@ -38,6 +38,47 @@ describe "Pipelines", feature: true, js: true do ...@@ -38,6 +38,47 @@ describe "Pipelines", feature: true, js: true do
expect(page).to have_css('#js-tab-pipeline.active') expect(page).to have_css('#js-tab-pipeline.active')
end end
context 'pipeline graph' do
it 'shows a running icon and a cancel action for the running build' do
page.within('.stage-column:first-child .build:first-child') do
expect(page).to have_selector('.ci-status-icon-running')
expect(page).to have_content('deploy')
expect(page).to have_selector('.ci-action-icon-container .fa-ban')
end
end
it 'shows the success icon and a retry action for the successfull build' do
page.within('.stage-column:nth-child(3)') do
expect(page).to have_selector('.ci-status-icon-success')
expect(page).to have_content('build')
expect(page).to have_selector('.ci-action-icon-container .fa-refresh')
end
end
it 'shows the failed icon and a retry action for the failed build' do
page.within('.stage-column:nth-child(2) .build') do
expect(page).to have_selector('.ci-status-icon-failed')
expect(page).to have_content('test')
expect(page).to have_selector('.ci-action-icon-container .fa-refresh')
end
end
it 'shows the skipped icon and a play action for the manual build' do
page.within('.stage-column:first-child .build:nth-child(2)') do
expect(page).to have_selector('.ci-status-icon-skipped')
expect(page).to have_content('manual')
expect(page).to have_selector('.ci-action-icon-container .ci-play-icon')
end
end
it 'shows the success icon for the generic comit status build' do
page.within('.stage-column:nth-child(4) .build') do
expect(page).to have_selector('.ci-status-icon-success')
expect(page).to have_content('jenkins')
end
end
end
context 'page tabs' do context 'page tabs' do
it 'shows Pipeline and Builds tabs with link' do it 'shows Pipeline and Builds tabs with link' do
expect(page).to have_link('Pipeline') expect(page).to have_link('Pipeline')
......
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