Commit e2e0a4d1 authored by Mayra Cabrera's avatar Mayra Cabrera Committed by Jose Ivan Vargas

Include feature spec for realtime pipeline

parent 52c79bc8
...@@ -511,18 +511,27 @@ feature 'File blob', :js do ...@@ -511,18 +511,27 @@ feature 'File blob', :js do
end end
context 'realtime pipelines' do context 'realtime pipelines' do
let(:user) { create(:user) }
let(:pipeline) { create(:ci_pipeline, project: project, ref: 'feature', sha: project.commit.id, user: user, status: :success) }
before do before do
project.add_master(user) Files::CreateService.new(
sign_in(user) project,
visit_blob('files/ruby/popen.rb', ref: 'feature') project.creator,
start_branch: 'feature',
branch_name: 'feature',
commit_message: "Add ruby file",
file_path: 'files/ruby/test.rb',
file_content: "# Awesome content"
).execute
create(:ci_pipeline, status: 'running', project: project, ref: 'feature', sha: project.commit('feature').sha)
visit_blob('files/ruby/test.rb', ref: 'feature')
end end
it 'should show the realtime pipeline status' do it 'should show the realtime pipeline status' do
wait_for_requests page.within('.commit-actions') do
expect(find('.js-commit-pipeline-status')).not_to be nil expect(page).to have_css('.ci-status-icon')
expect(page).to have_css('.ci-status-icon-running')
expect(page).to have_css('.js-ci-status-icon-running')
end
end end
end end
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