@@ -511,18 +511,27 @@ def visit_blob(path, anchor: nil, ref: 'master')
511
511
end
512
512
513
513
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
-
517
514
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' )
521
527
end
522
-
528
+
523
529
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
526
535
end
527
536
end
528
537
end
0 commit comments