Skip to content

Commit e2e0a4d

Browse files
Mayra CabreraJose Ivan Vargas
Mayra Cabrera
authored and
Jose Ivan Vargas
committed
Include feature spec for realtime pipeline
1 parent 52c79bc commit e2e0a4d

File tree

1 file changed

+18
-9
lines changed

1 file changed

+18
-9
lines changed

spec/features/projects/blobs/blob_show_spec.rb

Lines changed: 18 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -511,18 +511,27 @@ def visit_blob(path, anchor: nil, ref: 'master')
511511
end
512512

513513
context 'realtime pipelines' do
514-
let(:user) { create(:user) }
515-
let(:pipeline) { create(:ci_pipeline, project: project, ref: 'feature', sha: project.commit.id, user: user, status: :success) }
516-
517514
before do
518-
project.add_master(user)
519-
sign_in(user)
520-
visit_blob('files/ruby/popen.rb', ref: 'feature')
515+
Files::CreateService.new(
516+
project,
517+
project.creator,
518+
start_branch: 'feature',
519+
branch_name: 'feature',
520+
commit_message: "Add ruby file",
521+
file_path: 'files/ruby/test.rb',
522+
file_content: "# Awesome content"
523+
).execute
524+
525+
create(:ci_pipeline, status: 'running', project: project, ref: 'feature', sha: project.commit('feature').sha)
526+
visit_blob('files/ruby/test.rb', ref: 'feature')
521527
end
522-
528+
523529
it 'should show the realtime pipeline status' do
524-
wait_for_requests
525-
expect(find('.js-commit-pipeline-status')).not_to be nil
530+
page.within('.commit-actions') do
531+
expect(page).to have_css('.ci-status-icon')
532+
expect(page).to have_css('.ci-status-icon-running')
533+
expect(page).to have_css('.js-ci-status-icon-running')
534+
end
526535
end
527536
end
528537
end

0 commit comments

Comments
 (0)