diff options
author | Douwe Maan <douwe@gitlab.com> | 2018-03-01 20:40:24 +0300 |
---|---|---|
committer | Douwe Maan <douwe@gitlab.com> | 2018-03-01 20:40:24 +0300 |
commit | 008120f8db90dcf65fdd00343a4d8a22695abed1 (patch) | |
tree | 274e896be3f9b4b33fd922c4860668becbf74a93 /spec/features | |
parent | ccb080d94aa765d8391f262e25c5ead0764dc2ff (diff) | |
parent | 522f4b2c6a0a1fe1e93d7bc2f9fe5290fccba4f9 (diff) |
Merge branch '41777-include-cycle-time-in-usage-ping' into 'master'
Resolve "Include cycle time in usage ping"
Closes #41777
See merge request gitlab-org/gitlab-ce!16793
Diffstat (limited to 'spec/features')
-rw-r--r-- | spec/features/cycle_analytics_spec.rb | 20 |
1 files changed, 5 insertions, 15 deletions
diff --git a/spec/features/cycle_analytics_spec.rb b/spec/features/cycle_analytics_spec.rb index 510677ecf56..ef493db3f11 100644 --- a/spec/features/cycle_analytics_spec.rb +++ b/spec/features/cycle_analytics_spec.rb @@ -6,7 +6,7 @@ feature 'Cycle Analytics', :js do let(:project) { create(:project, :repository) } let(:issue) { create(:issue, project: project, created_at: 2.days.ago) } let(:milestone) { create(:milestone, project: project) } - let(:mr) { create_merge_request_closing_issue(issue, commit_message: "References #{issue.to_reference}") } + let(:mr) { create_merge_request_closing_issue(user, project, issue, commit_message: "References #{issue.to_reference}") } let(:pipeline) { create(:ci_empty_pipeline, status: 'created', project: project, ref: mr.source_branch, sha: mr.source_branch_sha, head_pipeline_of: mr) } context 'as an allowed user' do @@ -41,8 +41,8 @@ feature 'Cycle Analytics', :js do allow_any_instance_of(Gitlab::ReferenceExtractor).to receive(:issues).and_return([issue]) project.add_master(user) - create_cycle - deploy_master + @build = create_cycle(user, project, issue, mr, milestone, pipeline) + deploy_master(user, project) sign_in(user) visit project_cycle_analytics_path(project) @@ -117,8 +117,8 @@ feature 'Cycle Analytics', :js do project.add_guest(guest) allow_any_instance_of(Gitlab::ReferenceExtractor).to receive(:issues).and_return([issue]) - create_cycle - deploy_master + create_cycle(user, project, issue, mr, milestone, pipeline) + deploy_master(user, project) sign_in(guest) visit project_cycle_analytics_path(project) @@ -166,16 +166,6 @@ feature 'Cycle Analytics', :js do expect(find('.stage-events')).to have_content("!#{mr.iid}") end - def create_cycle - issue.update(milestone: milestone) - pipeline.run - - @build = create(:ci_build, pipeline: pipeline, status: :success, author: user) - - merge_merge_requests_closing_issue(issue) - ProcessCommitWorker.new.perform(project.id, user.id, mr.commits.last.to_hash) - end - def click_stage(stage_name) find('.stage-nav li', text: stage_name).click wait_for_requests |