summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMayra Cabrera <mcabrera@gitlab.com>2018-03-14 12:41:32 -0600
committerJose Ivan Vargas <jvargas@gitlab.com>2018-03-14 13:31:40 -0600
commite2e0a4d1570ad4adc640b4c49fc58ed544272e93 (patch)
treefaae3f367bd80ecf28b393444040cf18675ec1f9
parent52c79bc8b30f391e205a66f109a94f2ace5c6b6a (diff)
downloadgitlab-ce-jivl-realtime-update-adding-file.tar.gz
Include feature spec for realtime pipelinejivl-realtime-update-adding-file
-rw-r--r--spec/features/projects/blobs/blob_show_spec.rb27
1 files changed, 18 insertions, 9 deletions
diff --git a/spec/features/projects/blobs/blob_show_spec.rb b/spec/features/projects/blobs/blob_show_spec.rb
index 0fd21a2019c..ac82f869f0f 100644
--- a/spec/features/projects/blobs/blob_show_spec.rb
+++ b/spec/features/projects/blobs/blob_show_spec.rb
@@ -511,18 +511,27 @@ feature 'File blob', :js do
end
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
- project.add_master(user)
- sign_in(user)
- visit_blob('files/ruby/popen.rb', ref: 'feature')
+ Files::CreateService.new(
+ project,
+ 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
-
+
it 'should show the realtime pipeline status' do
- wait_for_requests
- expect(find('.js-commit-pipeline-status')).not_to be nil
+ page.within('.commit-actions') do
+ 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