Commit 01c8499a authored by Filipa Lacerda's avatar Filipa Lacerda

Fix broken rspec tests

parent 77daed05
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
<div class="btn-group"> <div class="btn-group">
<a <a
v-if='pipeline.details.manual_actions.length > 0' v-if='pipeline.details.manual_actions.length > 0'
class="dropdown-toggle btn btn-default" class="dropdown-toggle btn btn-default js-pipeline-dropdown-manual-actions"
data-toggle="dropdown" data-toggle="dropdown"
title="Manual build" title="Manual build"
alt="Manual Build" alt="Manual Build"
...@@ -55,7 +55,7 @@ ...@@ -55,7 +55,7 @@
<div class="btn-group"> <div class="btn-group">
<a <a
v-if='pipeline.details.artifacts.length > 0' v-if='pipeline.details.artifacts.length > 0'
class="dropdown-toggle btn btn-default build-artifacts" class="dropdown-toggle btn btn-default build-artifacts js-pipeline-dropdown-download"
data-toggle="dropdown" data-toggle="dropdown"
type="button" type="button"
> >
......
...@@ -125,6 +125,7 @@ describe "Pipelines", feature: true, js: true do ...@@ -125,6 +125,7 @@ describe "Pipelines", feature: true, js: true do
context 'when playing' do context 'when playing' do
before do before do
wait_for_vue_resource wait_for_vue_resource
find('.js-pipeline-dropdown-manual-actions').click
click_link('Manual build') click_link('Manual build')
end end
...@@ -213,6 +214,7 @@ describe "Pipelines", feature: true, js: true do ...@@ -213,6 +214,7 @@ describe "Pipelines", feature: true, js: true do
it do it do
wait_for_vue_resource wait_for_vue_resource
find('.js-pipeline-dropdown-download').click
expect(page).to have_link(with_artifacts.name) expect(page).to have_link(with_artifacts.name)
end end
end end
...@@ -256,107 +258,6 @@ describe "Pipelines", feature: true, js: true do ...@@ -256,107 +258,6 @@ describe "Pipelines", feature: true, js: true do
end end
end end
describe 'GET /:project/pipelines/:id' do
let(:project) { create(:project) }
let(:pipeline) do
create(
:ci_pipeline,
project: project,
ref: 'master',
sha: project.commit.id
)
end
before do
@success = create(
:ci_build,
:success,
pipeline: pipeline,
stage: 'build',
name: 'build'
)
@failed = create(
:ci_build,
:failed,
pipeline: pipeline,
stage: 'test',
name: 'test',
commands: 'test'
)
@running = create(
:ci_build,
:running,
pipeline: pipeline,
stage: 'deploy',
name: 'deploy'
)
@manual = create(
:ci_build,
:manual,
pipeline: pipeline,
stage: 'deploy',
name: 'manual build'
)
@external = create(
:generic_commit_status,
status: 'success',
pipeline: pipeline,
name: 'jenkins',
stage: 'external'
)
end
before do
visit namespace_project_pipeline_path(
project.namespace, project, pipeline
)
end
it 'shows a list of builds' do
expect(page).to have_content('Test')
expect(page).to have_content(@success.id)
expect(page).to have_content('Deploy')
expect(page).to have_content(@failed.id)
expect(page).to have_content(@running.id)
expect(page).to have_content(@external.id)
expect(page).to have_content('Retry failed')
expect(page).to have_content('Cancel running')
expect(page).to have_link('Play')
end
context 'retrying builds' do
it { expect(page).not_to have_content('retried') }
context 'when retrying' do
before { click_on 'Retry failed' }
it { expect(page).not_to have_content('Retry failed') }
it { expect(page).to have_selector('.retried') }
end
end
context 'canceling builds' do
it { expect(page).not_to have_selector('.ci-canceled') }
context 'when canceling' do
before { click_on 'Cancel running' }
it { expect(page).not_to have_content('Cancel running') }
it { expect(page).to have_selector('.ci-canceled') }
end
end
context 'playing manual build' do
before do
within '.pipeline-holder' do
click_link('Play')
end
end
it { expect(@manual.reload).to be_pending }
end
end
describe 'POST /:project/pipelines', feature: true, js: true do describe 'POST /:project/pipelines', feature: true, js: true do
let(:project) { create(:project) } let(:project) { create(:project) }
......
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